View Single Post
Join Date: Nov 2008
Posts: 3
Reputation: georgewb is an unknown quantity at this point 
Solved Threads: 0
georgewb georgewb is offline Offline
Newbie Poster

console.nextChar(); HELP PLEASE???

 
0
  #1
Nov 21st, 2008
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
Last edited by georgewb; Nov 21st, 2008 at 8:41 pm.
Reply With Quote