+ 1
Example program not working
when I pressed javac example program.java in commandpromt it automatically went to next line after that I pressed java exampleprogram as they said in tutorial and it came a error "could not find main class exampleprogram " this was the error
7 odpowiedzi
+ 5
Make sure that public class name containing main () and your .java filename are the same.
File name: exampleprogram.java
Content:
public class exampleprogram{
public static void main (String [] args){
//to do
}
}
+ 4
Better you should use Netbeans or Eclipse IDE. They will make your programming more easier
+ 3
😂😎that part was left for you dear🤔
+ 1
u missed the line
System.out.println("helloworld");
0
so why iam not getting
0
when I saved it as a .java I could not open it
it says windows can't open file
0
thank you devender mahajan