I had a doubt. Why in java all the lines even the main function need to be inside the class? Can anyone help me | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I had a doubt. Why in java all the lines even the main function need to be inside the class? Can anyone help me

16th Dec 2017, 2:21 AM
lokesh krishna
1 Answer
+ 1
ok,but c++ is also a object oriented programming language but there we don't write main function inside the class why
16th Dec 2017, 2:57 PM
lokesh krishna