+ 1
What is public what is static what is void ..... Why do we need this ... Without them why cant we run program .... What they do
if u give examples instead of hard definations ... so i can understand perfectly ...
4 odpowiedzi
+ 1
Public and private are basically saying this method or function can or cannot be globally accessed.
+ 1
Public static void main method is witten in Jvm class.
When we try to run program Jvm first search whether this main method is present or not. If present then it start execution otherwise we will get runtime error
Public: to call by jvm from anywhere
Static: without existing object jvm has to call this method and main method. No way related to any object
Void: main method wont return anything to jvm
Main : this is the name which is configured inside jvm
Hope this will help you
0
thx uday sir ...
0
thx ari sir