+ 1
Why there is Error like CANNOT FIND SYMBOL in Output?
public class Main { static void sayHello(String name) { System.out.println("Hello " + name); } public static void main(String[ ] args) { Scanner hep=new Scanner(System.in); String name=hep.nextLine(); sayHello(name); } } OUTPUT:Main.java:7: error: cannot find symbol public static void main(String[ ] args) {Scanner hep=new Scanner(System.in);String name=hep.nextLine(); ^ symbol: class Scanner location: class Main Main.java:7: error: cannot find symbol public static void main(String[ ] args) {Scanner hep=new Scanner(System.in);String name=hep.nextLine(); ^ symbol: class Scanner location: class Main 2 errors
3 Respostas
+ 1
Thanks
0
I FORGOT. What A simple Mistake
- 1
Import util package then you will able to use all classes an interfaces available in util