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 a numeric digit?
What is object-oriented paradigm?
When should we create our own custom exception classes?
What do you mean by ternary operator in java?
Is boolean a data type in java?
What are the methods used to implement for the key object in the hash map?
How to calculate the length of a singly linked list in java?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?
How do I start learning java?
What is the difference between keyword and identifier?
What is an inner class in java?
What is the difference between form & report?
Is a boolean 1 bit?
How can we run a java program without making any object?
Can you explain inner class.