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

How are the elements of a gridbaglayout organized in java programming?

511


How to split a string in java?

616


What will be the default values of all the elements of an array defined as an instance variable?

544


How are java objects passed to a method and what are native methods?

585


explain autoboxing in java?

588






What is a Hash Table? What are the advantages of using a hash table?

599


Which is better arraylist or vector?

562


Can list have duplicates in java?

517


What is public static?

487


How do you break a loop?

555


Explain the access modifiers for a class, method and variables?

645


How can we use primitive data types as objects?

550


What does the @override annotation do?

550


Why Do I Get A "permission Denied" Error After Downloading The .jnlp Java Launcher For The Vkvm?

616


How many types of flags are there?

513