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 the exact difference in between unicast and multicast object? Where we will use?
What is a classloader in java?
Mention some features of java?
How to pass arraylist to stored procedure in java?
Why are the destructors for base class and derived class called in reverse order when the program exits
What is callablestatement? How you can call stored procedure to pass in parameter?
How a string is stored in memory?
Differentiate between run time error and syntax error.
How do you implement tree mirroring in java?
Is java pass by value or pass by reference?
Is it compulsory for a try block to be followed by a catch block in java for exception handling?
Does java set allow duplicates?
worst case complexities of Quick sort and Merge sort.
What is the declaration statement?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)