0
Find the error
public class JavaTutorial { public static void main(string []args){ //TODO Auto-generated method stub int x=1; while(x<=4){ system. out.println(x); x++; } } }
4 Respuestas
+ 4
"string" should be "String"
"system" should be "System"
Why? (please revise the Java basic course again)
public class JavaTutorial {
public static void main(String []args){
//TODO Auto-generated method stub
int x=1;
while(x<=4){
System.out.println(x);
x++;
}
}
}
+ 3
Thanks
+ 3
Yeva
System and String are class so class name should be start with Capital letter.
out is a object of System class and println is a method in System class and we call method using object so here
System - class //should start with Capital letter
out - object //should start with small letter
println - method //should start with small letter
+ 1
Please help