Why does java not allow multiple public classes in a java file ?
Answer Posted / rahul
java does not support multiple public classes because of there are only one main method to define......and we can not have multiple main methods in a same class....and we know that java code will always save as the name of class name in which main method are define......
Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Difference between stack and queue?
What is the use of http-tunneling in rmi?
Can we restart a thread already started in java?
What is flag in python?
What are heap memory and stack memory and what are memory tables.
Explain the different forms of polymorphism?
Can we increase size of array?
How do you create a method in java?
Can we override data members in java?
How will you reverse a singly-link list?
What are the three parts of a lambda expression? What is the type of lambda expression?
What is the latest java version?
What is a dot notation?
what state does a thread enter when it terminates its processing? : Java thread
Which is better 64 bit or 32 bit?