What is main function purpose?
No Answer is Posted For this Question
Be the First to Post Answer
How do you convert an int to a double in java?
What is a jagged array in java?
What is wrapper class html?
what are the methods of an object class?
What are blocks?.
What is the generic function?
When do we use synchronized blocks and advantages of using synchronized blocks?
What is the life-cycle of an object?
How many types of literals are there in JAVA?
What are namespaces in java?
Is it possible to write JAVA program without including any of the packages,such as "import java.io.*"; bcoz I instantly wrote a code without "import..." statement and runned the program on command Line & it worked. the code is: class Person { String name; int age; Person(String s,int a) { name = s; age = a; } accept() { System.out.println(name+"Hi!!!!!"); System.out.println(age); } } class Demo { public static void main(Strings args[])throws IOException { String name = args[0]; int age = Integer.parseInt(args[1]); Person p = new Person(name,age); p.accept(); } }
Why main function is static?