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
Is string an object?
What is meant by class loader? How many types are there?
What is the difference between int and integer in java?
What is methodological framework?
What is the use of join method?
What is slash r?
How to check if linked list contains loop in java?
When is the arraystoreexception thrown?
How do you override a private method in java?
Why java is used everywhere?
What are the different collection views provided by maps?
What are the rules for naming an array?
What are data types in oop?
What is the do while loop syntax?
What is ascii format?