| | |
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 |
-xlint 911 actionlistener addressbook android api append applet application array arrays automation binary blackberry block bluetooth character class client code compile component consumer csv database desktop developmenthelp eclipse error fractal freeze ftp game gameprogramming givemetehcodez graphics gui html ide image integer j2me j2seprojects japplet java javaarraylist javac javaee javaprojects jni jpanel julia lego linked linux list mac map method methods mobile netbeans notdisplaying number objects online oriented printf problem program project projects recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server set singleton sms sort sql string swing system test textfields threads time title tree tutorial-sample ubuntu update windows working





