| | |
console.nextChar(); ???
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
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 |
911 addball addressbook android api append applet application array arrays automation binary bluetooth button character chat class classes client code component css csv database eclipse ee error event exception fractal ftp game givemetehcodez graphics gui html ide image input integer j2me japplet java javaarraylist javaee javaprojects jmf jni jpanel julia jvm key linked linux list loan loop map method methods mobile netbeans newbie objects oriented output panel phone print printf problem program programming project projects recursion replaydirector reporting researchinmotion robot rotatetext scanner screen se server service set size sms software sort sql string swing test threads transfer tree ubuntu windows





