What happens when a main method is declared as private?
Answer Posted / srinivasa
JVM is also a program. If main() is declared as privateit
is not available outside of that class . So JVM through the
exception.
Is This Answer Correct ? | 15 Yes | 5 No |
Post New Answer View All Answers
What is the generic class?
What is a local, member and a class variable?
How do you declare an array that will hold more than 64KB of data?
What’s a deadlock?
What is tostring () method?
What is a layout manager and what are different types of layout managers available in java awt?
Can we use a switch statement with strings?
Explain creating threads by extending thread class ?
What is the difference between call by reference and call by pointer?
What is advantage of java?
Explain the advantages of packages in java?
What is deserialization?
What is a heavyweight component?
What is assembly used for?
What are the differences between the constructors and methods?