+ 1
what's wrong in the codes. I would appreciate any help
public class Program { public static void eh(int x) { System.out.println("x is "+x) ; } } public static void main(String[]args) { eh(57) ; eh(); }
1 Resposta
+ 6
you are closing the class too early. include main into the class. also you can't call eh without arguments. your code should look like this:
public class Program {
public static void eh(int x) {
System.out.println("x is "+x) ;
}
public static void main(String[] args) {
eh(57) ;
eh(0);
}
}