anandkumarjha


{ City } salem
< Country > india
* Profession * student
User No # 58456
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 3
Users Marked my Answers as Wrong # 0
Questions / { anandkumarjha }
Questions Answers Category Views Company eMail




Answers / { anandkumarjha }

Question { HCL, 7209 }

why we write public static void main (String args[])
in core java plz explain briefly??????????????????


Answer

we write public because it can be called from outside the envornment and as we know that by using public keyword we will be able to access all the codes from outside,static is used because the JVM(java virtual machine which is also called as the interpreter calles the main function when there is no declaration of class instances so if we dont use static then the interprter will not check for it ,we use string and its a kind of class.It is also known as the commad line argument.

Is This Answer Correct ?    3 Yes 0 No