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


Please Help Members By Posting Answers For Below Questions

Define linked list and its features with signature?

543


What are the different ways to handle exceptions?

544


Is a char always 1 byte?

511


What is a Presistent Object?

647


When is the finally clause of a try-catch-finally statement executed?

506






What are the features of junit?

604


What is a hashmap used for?

652


Define packages in java?

580


What purpose do the keywords final, finally, and finalize fulfill?

618


What is the different types of functions?

563


What is the parse method in java?

574


does java support pointers?

569


What is yield () in java?

484


How do you remove an object from an arraylist in java?

467


Is nan false?

537