+ 2
Please help me out to fix the following error occured in Java program. Details of it are mentioned in description.
Error: The constructor Scanner(InputStream) is undefined The method nextline() is undefined for the type Scanner at Scanner.main(Scanner.java:5)
6 Réponses
+ 7
change class Scanner to something else
+ 4
try nextLine()
+ 4
code?
+ 2
Still not working
+ 2
import java.util.Scanner;
class Scanner
{
public static void main(String args[])
{
Scanner peaches = new Scanner(System.in);
System.out.println(peaches.nextLine());
}
}
+ 2
yehh, I changed it just now only. The moment ur message popped up.
Well thanx for ur help.