0

Why my java program can't be compiled? There were no writing errors in the program. What should i do?

I have put the java compiler in its path (system environment variables), my java program is placed on drive E, and the java application (jdk) on drive C. I compile using cmd, but it always gets an error like this (Student.java:2: error: cannot find symbol   public string name;          ^   symbol: class string   location: Student class Student.java:3: error: cannot find symbol   public string name;          ^   symbol: class string   location: Student class 2 errors) but actually there were no writing error

9th Sep 2019, 11:54 AM
yasifa ana
2 Respuestas
+ 5
's' should be capital in string. So declaration should be like public String <variable_name>;
9th Sep 2019, 12:28 PM
blACk sh4d0w
blACk sh4d0w - avatar
+ 1
Thank you so much nAutAxH AhmAd ,, i can compile the program now
9th Sep 2019, 12:33 PM
yasifa ana