| | |
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 |
2dgraphics account android api apple applet application arguments array arrays automation banking binary binarytree bluetooth chat chatprogramusingobjects class client code color component count database derby design eclipse eclipsedevelopment encryption error fractal game givemetehcodez graphics gridlayout gui homework html ide if_statement image integer interface j2me java javadesktopapplications javaprojects jlabel jni jpanel julia keyword linux list macintosh map method methods midlethttpconnection mobile netbeans newbie nullpointerexception object open-source os problem producer program programming project projectideas property read recursion reference replaysolutions ria scanner search server set size sms sort sourcelabs splash sql sqlite stop string swing testautomation threads transforms tree ui unicode validation windows





