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
Is string an object?
What java is used for?
What is JDBC Driver interface?How can you retrieve data from the ResultSet
How to sort elements in a parallel array in java?
How to instantiate static nested classes in java?
Differentiate between run time error and syntax error.
How is java hashmap implemented?
How do you get length in java?
Are strings immutable in java?
What a static class can contains?
How to retrieve data from database in java using arraylist?
What is object-oriented paradigm?
What is variable explain?
What is the difference between @before and @beforeclass annotation?
What are the loops in java?