Yes you can name a file (class if you use eclipse) java or even have java in the name.
No. There can be multiple java classes in the same .java file, but the name of the file must match the name of the public class in the file.
If you want to compile a java program the name of that source code must end with extension .java
Adobe flash player
The name of the .java file should exactly match with the name of the public class in the file. Ex: public class Test { ..... } this file should be saved as Test.java
Yes, it can. However, there can only be one public class per .java file, as public classes must have the same name as the source file.
It is not compulsory that the java file name and name of the public class should be same. if u will give java file name and public class name different then u have to compile and run the program with another names. for example: u have named class sample i.e. (public class sample) and main function is also defined in this class. and u have saved the file as abc.java then u will first comple the file as: javac abc.java now run the file (type java class name(in which main function is defined) i.e. java sample try it.
True
For run the program
No, you do not have to type the file extension if you want to include the file name. You only use file extension to make the specific file be able to be run by the program. Example: I want to make my file into a java program so i can use with a specific type of program which only runs java file i put .jav at the end of the title to make it from a text file to a java file.
The command to compile a Java program is "javac", followed by the class name (file name).
ObjectNameHere.java
You can simply list them with spaces separating each file name: javac class1.java class2.java