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 are the properties of thread?
How does map works in java?
What are the new features in java 8? Explain
How would overload a function based on return type?
What are the core java topics?
What is the use of arraylist class in java?
Why do we use return statement?
Write a program to reverse a number in java?
What is the difference between synchronized and synchronized block?
What is linked hashmap and its features?
What are facelets templates?
What are the benefits of java?
What is the difference between preemptive scheduling and time slicing?
Why is java called java?
What is a numeric literal?