Why only one Class is public in one file? Explain in
details. Thanks in Advance.

Answer Posted / janardhan

In an aplication public class is main class with main()
method as entry point

java compiler allows only one public class in file

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we override a variable in java?

543


What is the difference between exception and error in java?

489


State some situations where exceptions may arise in java?

625


What is java lang object?

527


Difference between overriding and overloading in java?

575






What are the main features of java?

526


What is the difference between an object-oriented programming language and object-based programming language?

563


What is java in layman terms?

523


What is arraylist e in java?

506


Is java call by value?

583


Using callable statement how can you pass out parameters, explain with example?

584


What is stack class in java?

538


What is Session reduplication and how its done?

1562


What is an object’s lock and which object’s have locks?

504


What are the types of java?

600