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

Can we create our own daemon thread?

550


What is the difference between arraylist and hashset in java?

527


What is overloading and overriding in java?

675


What is advantage of java?

555


Can you call a method on a null object?

581






Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?

625


Can you instantiate the math class in Java?

629


why doesn't java run on all platforms?

581


What are different exception types exceptions available in java ?

498


What is an array in java?

648


What is return keyword in java?

574


What is a short in java?

516


What is nextint java?

564


What does provide mean construction?

567


How do generics work?

528