Hello,
Im trying to create file . I'm almost done my program but Im getting this error.
The method read() is undefined for the type Scanner

Recommended Answers

All 2 Replies

Yea I changed it to nextInt, now I'm getting this error exception in thread "main" java.util.InputMismatchException

Look at the javadoc for scanner: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html

where do you see a method called read? None exists. Hence your error.

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.