23rd Dec 2022, 6:13 PM
Ahmed Alkamali
Ahmed Alkamali - avatar
3 Respuestas
+ 5
Main method
23rd Dec 2022, 6:16 PM
Jayakrishna 🇮🇳
+ 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
25th Dec 2022, 6:23 PM
Jayakrishna 🇮🇳
0
Excuse me can you explain more about "main method?
24th Dec 2022, 6:54 PM
Ahmed Alkamali
Ahmed Alkamali - avatar