what is purpose of writting public static void main(Strind
arg[]) in java..?
Answer Posted / jyotshna pardhia
public: to call by jvm from anywhere.(i.e. suppose ur
programms are saved in d drive and jdk is installed in e
drive so we can call by jvm from any drive )
static: without creating objects also jvm has to call this
method.
void: main() method never returns anything to jvm.
main: name of this method which is configured as main
only,inside the jvm by sun.
String []args: command line arguments.
if we are performing any changes to this main method than
we will get run time exception but still we can add
identifiers like strictfp and synchronized to main method.
Thanks & Regards
jyotshna
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What are the approaches that you will follow for making a program very efficient?
What is the difference between static class and normal class?
What is a short in java?
What is an object's lock and which object's have locks in java programming?
What is compareto?
Can we override final method?
Is string a datatype?
Is java jre still free?
Explain the concept of proper inheritance?
Can a static class implement an interface?
What is the difference between jvm and jre? What is an interface?
Explain an algorithm to find depth of a binary tree.
What is quick sort in java?
What is public static?
What do you mean by Hash Map and Hash Table?