Why only one Class is public in one file? Explain in
details. Thanks in Advance.
Answer Posted / rakesh soni
Hi Mahendra,
This is OK that, compiler allowed only one class as public
per file. But my question is, why compiler allowed only one
class as a public in one file, why not more then one???
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
Can a constructor be protected?
What are three ways in which a thread can enter the waiting state in java programming?
What is the advantage of functional interface in java 8?
Can string be considered as a keyword?
Can static method access instance variables ?
What is bytecode in java ?
Is void a return type?
How to make object serializable in java?
What is an arraylist in java?
Differences between external iteration and internal iteration?
What is bubble sort in java?
What is meant by class loader? How many types are there?
What will be the default values of all the elements of an array defined as an instance variable?
What is immutability in java?
Is null an object java?