| | |
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 |
android api applet application apps array arrays automation awt bidirectional binary birt bluetooth businessintelligence busy_handler(null) card chat class classes client code collision columns component constructor database designadrawingapplicationusingjavajslider draw eclipse error errors eventlistener exception expand fractal free game givemetehcodez graphics gui guidancer html ide image inetaddress integer integration intellij j2me java javafx javamicroeditionuseofmotionsensor javaprojects jme jni jpanel jtree julia linux list loop machine map method methods migrate mobile mobiledevelopmentcreatejar myaggfun netbeans newbie oracle plazmic print problem program programming project recursion scanner server set sharepoint smart sms smsspam sort sortedmaps sql string subclass support swing textfield threads tree unlimited utility webservices windows





