Why to give the file name same as the public class name in
java?

Answer Posted / akanksha bansal

So that ,that class is accessible from some other class/file
as well

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between method overloading and method overriding in java ?

558


Why we override equals() method?

559


What are scriptlets?

593


Can we make constructors static?

717


What are byte codes?

653






What are the two types of exceptions in java? Which are the differences between them?

504


What is casting in java programming?

574


Is java platform independent?

561


Explain about instanceof operator in java?

601


Explain the init method?

539


What does main method?

555


Can one thread block the other thread?

599


Does java support Operator Overloading?

603


What is unsigned char?

610


Why do we need data serialization?

538