Java code (Array) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Java code (Array)

Why we need add new keyword under main method? since i did create a object for the class https://code.sololearn.com/cUOS0dVL8YYO

9th Jun 2019, 6:30 AM
Tzion
Tzion - avatar
1 Answer
+ 3
Because main, being a static method, dont belong to a Program object than you have to create yourself one
9th Jun 2019, 9:08 AM
KrOW
KrOW - avatar