Need to use public,static keywords in main function?
Answer Posted / sreedhar
yes,need two thing, javac execution start with main
method,that method declars the private,protected not access
the out side class.
Staic block is execute the first part of the progream ,u
need to mention the Staic on thet main method.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can an interface be defined inside a class?
How does the garbage collector works in java?
Explain the selection sort algorithm?
Give few examples of final classes defined in Java API?
Why does it take so much time to access an applet having swing components the first time?
What is string in java is it a data type?
What is supplier in java?
What is a protected method?
Can we extend immutable class?
What is the significance of listiterator?
What is the constructor?
What is a dynamic array in java?
What is the escape character in java?
Difference between static synchronization vs. Instance synchronization?
State the difference between creating string as new () and literal.