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
what is bmg file and how to create that files?what will it contailn?
What kind of variables a class can consist of?
What is string value?
When is the arraystoreexception thrown?
How does compareto work in java?
How do you get the length of a string in java?
Why is stringbuffer thread safe?
What is the synchronized method modifier?
What is bifunction in java?
What is a bufferedreader?
which class is the wait() method defined in? : Java thread
what is meant by HQL?
How do I get the | symbol on my keyboard?
Difference between overriding and overloading in java?
What are the application of stack?