why we write public static void main (String args[])
in core java plz explain briefly??????????????????
Answer Posted / anand kumar jha
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 |
Post New Answer View All Answers
What is anagram number?
Explain about object oriented programming and its features?
When is the finally clause of a try-catch-finally statement executed?
What is 32 bit float?
Java is pass by value or pass by reference? Explain
Can a class be private or protected in java?
What will be the initial value of an object reference which is defined as an instance variable?
What do you understand by final value?
Is null or empty java?
What is the intersection and union methods?
What sorting algorithm does javascript use?
what is anonymous class in java?
Are maps ordered java?
Explain what access modifiers can be used for methods?
What is argument in java?