+ 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 ...

15th Dec 2016, 3:03 PM
Prashant Malviya
Prashant Malviya - avatar
4 Answers
+ 1
Public and private are basically saying this method or function can or cannot be globally accessed.
15th Dec 2016, 5:11 PM
Ari
+ 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
17th Dec 2016, 4:43 PM
uday chafale
uday chafale - avatar
0
thx uday sir ...
17th Dec 2016, 5:20 PM
Prashant Malviya
Prashant Malviya - avatar
0
thx ari sir
17th Dec 2016, 5:20 PM
Prashant Malviya
Prashant Malviya - avatar