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 does g mean in regex?
How can you add and remove nodes in jtree?
This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }
How do you create a first line indent?
Write java program to reverse string without using api?
How can we access some class in another class in java?
What are data types in oop?
What is a java list?
What are computer functions?
How does regex work?
What do you mean by synchronized non access modifier?
Is binary a low level language?
Why do we use bufferedreader?
Explain about class in java?
What is functional interface in javatpoint?