| | |
console.nextChar(); ???
Thread Solved
![]() |
•
•
Join Date: Nov 2008
Posts: 3
Reputation:
Solved Threads: 0
Hi everyone,
I need your help please
What do i need to make my program read
the next character
using console.nextChar();
I've added the following:
import java.util.*;
static Scanner console = new Scanner(System.in);
and then in the main:
char ch;
ch = console.nextChar();
and when i compile i get this error::
cannot find symbol
symbol : method nextChar()
location: class java.util.Scanner
ch = console.nextChar();
can any 1 help me please??
thanks
I need your help please
What do i need to make my program read
the next character
using console.nextChar();
I've added the following:
import java.util.*;
static Scanner console = new Scanner(System.in);
and then in the main:
char ch;
ch = console.nextChar();
and when i compile i get this error::
cannot find symbol
symbol : method nextChar()
location: class java.util.Scanner
ch = console.nextChar();
can any 1 help me please??
thanks
Last edited by georgewb; Nov 21st, 2008 at 8:41 pm.
•
•
Join Date: Nov 2008
Posts: 3
Reputation:
Solved Threads: 0
so how can i make a program that reads the 1st character that the user enters:
for example:
if user enters :: A 1 2
ch= console.nextChar();
g = console.nextInt();
h= console.nextInt();
what can i use instead of nextChar()??
Thanks in advance
for example:
if user enters :: A 1 2
ch= console.nextChar();
g = console.nextInt();
h= console.nextInt();
what can i use instead of nextChar()??
Thanks in advance
![]() |
Similar Threads
- Class & method Boolean (Java)
Other Threads in the Java Forum
- Previous Thread: downloading to a certain directory
- Next Thread: Animated GIF with Graphics, or Graphics2D?
| Thread Tools | Search this Thread |
account android applet application apps array automation awt bidirectional binary birt bluetooth businessintelligence busy_handler(null) card class classes client code collision columns component constructor database designadrawingapplicationusingjavajslider draw eclipse error eventlistener exception expand fractal free game givemetehcodez graphics gui guidancer homework html ide image inheritance integer integration intellij j2me java javafx javamicroeditionuseofmotionsensor javaprojects jlabel jme jni jpanel jtextfield jtree julia linux loop method midlethttpconnection migrate mobile mobiledevelopmentcreatejar monitoring myaggfun netbeans newbie nullpointerexception open-source oracle plazmic print problem program property ria scanner server set sharepoint smart sms smsspam sourcelabs splash sql sqlite subclass support swing testautomation textfield threads tree trolltech unlimited utility windows





