How are Java source code files named?

Answer Posted / niranjanravi

A java source code file contains atmost one public class
or interface defined with in the file.Java source code
files takes the name of the public class or interface that
is defined with in the source code file.If no public class
or interface is defined with in the source code file then
file must take on a name that is different than its public
class or interface.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is synchronization and why is it important? : Java thread

588


What is singleton service?

512


Explain java coding standards for methods?

608


What are the 5 types of research methods?

589


What is difference between Heap and Stack Memory?

536






What is the maximum size of a string in java?

551


What do you mean by formatting?

547


How to handle a web browser resize operation?

544


Explain about static nested classes in java?

611


why are wait(), notify() and notifyall() methods defined in the object class? : Java thread

553


What is a numeric literal?

527


What is classpath?

550


Does java support function overloading, pointers, structures, unions or linked lists?

607


What is the technique adopted to create an immutable class?

525


What is meant by call by reference?

511