0
What is missing here
3 Respostas
+ 5
Main method
+ 1
Program execution in java starts from main method. With out main method, your program won't run.
You created a class and inner class. To use these, you need to call it. That is possible from main method of main class.
Remove first line code and last }
And add this class having main method. Then execute and see result.
class program {
public static void main(String[] a){
Emp obj = new Emp();
obj.display();
}
}
edit : more info:
https://www.digitalocean.com/community/tutorials/public-static-void-main-string-args-java-main-method
0
Excuse me can you explain more about "main method?