+ 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

5th Apr 2017, 10:06 AM
Naredla Ajay (Channel A)
Naredla Ajay (Channel A) - avatar
7 Respuestas
+ 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 } }
5th Apr 2017, 10:17 AM
देवेंद्र महाजन (Devender)
देवेंद्र महाजन (Devender) - avatar
+ 4
Better you should use Netbeans or Eclipse IDE. They will make your programming more easier
5th Apr 2017, 10:28 AM
देवेंद्र महाजन (Devender)
देवेंद्र महाजन (Devender) - avatar
+ 3
😂😎that part was left for you dear🤔
5th Apr 2017, 10:21 AM
देवेंद्र महाजन (Devender)
देवेंद्र महाजन (Devender) - avatar
+ 1
u missed the line System.out.println("helloworld");
5th Apr 2017, 10:19 AM
Naredla Ajay (Channel A)
Naredla Ajay (Channel A) - avatar
0
so why iam not getting
5th Apr 2017, 10:21 AM
Naredla Ajay (Channel A)
Naredla Ajay (Channel A) - avatar
0
when I saved it as a .java I could not open it it says windows can't open file
5th Apr 2017, 10:22 AM
Naredla Ajay (Channel A)
Naredla Ajay (Channel A) - avatar
0
thank you devender mahajan
5th Apr 2017, 10:28 AM
Naredla Ajay (Channel A)
Naredla Ajay (Channel A) - avatar