Need to use public,static keywords in main function?
Answer Posted / aravinda reddy
1) Public access modifier specifies class declared can be
accesses from anywhere
2) where as static refers with out creating instance of the
class JVM should access the main class while executing.
3) void specified main function should not return any value
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }
What are advantages of exception handling in java?
Enlist diffrent types of inheritance supported by java?
What is the purpose of a volatile variable?
What are the two types of java programming?
Write a program to calculate factorial in java?
What is the static variable?
What are the topics in core java?
How do you square a number in java?
Is java se free?
What are reference variables in java?
Can I learn java in 3 months?
What are the data types supported by java? What is autoboxing and unboxing?
What is flag in python?
why Interface used?