Hi,

I want to take a character using the scanner class and then i want to find and count it in certain file

i did
like this

char countingChar ;
countingChar= scan.nextChar();

but my compiler show error at this line
scan.nextChar()

then i find this blog on the sun
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5066699

so now if i still want to take a char value from the user what can i do .....

Uhm, use next() and then toCharArray() and access the chars that way.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.