Compile Error
public class hello {
public static void hello (String[] args) {
System.out.println("welcome to java !");
}
why it is Compile Error ?
You should using "Main" class and "main" function in this site.
Main.java:1: error: class main is public, should be declared in a file named main.java
public class main{
^
1 error
i did but this is the result .. !!
public class Main is coreect
public class main => public class Main
Java language recognizes upper case and lower case are different things.
public class Main{
public static void main (String[] args) {
System.out.println("welcome to java !");
}
}
i did like this but tell me wrong answer ㅜㅜ
Welcome to Java!
welcome come to java !
First and second line arent same.
Computer recognize space (' ') and upper/lowr case