answersLogoWhite

0

not exactly..... only If your class is public then the java program name should be the public class name with extension Sample.java >> public class Sample { public static void main(String[] args) { ..... } } NonPublicClass.java class SomeOtherName { ......... }

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

The name of a Java program file must match the name of the class with the extension java A True B False?

True


Java program file must match the name of class with extension true or false?

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


Extension file for Java?

Java source files have the .java extension, compiled Java class files have the .class extension.


Where java program started?

If it is already compiled, you can start your Java program from the command line. Just type java myclass replacing "myclass" with the program you want to start - a program with the ".class" extension, for example, myclass.class.


When java uses compiler?

What i know is java we will use compiler when it want to get class file(file with .class extension) from java file(file with .java extension).


Is java interpreter or compiler?

Java has both a compiled and an interpreted stage.1) The programmer writes his source codes (.java extension); a compiler will compile this to bytecode (.class extension).2) When the end-user runs the .class program, the JVM (Java Virtual Machine) will interpret this.


What JDK command is used to run a java application in byteCodeclass?

To run a Java program, you use the following form: java ClassFileName ClassFileName is the name of the .class file that you wish to execute. However, you do not type the .class extension.


It is not an error not to end a Java file name with the java extension?

If you want to compile a java program the name of that source code must end with extension .java


What is the extension of a java byte code file?

.class is the extension of a java byte code file.


What is the difference between exe and class files?

in .exe file it contains machine understandable code. but in .class file it contain only byte code which is not understadable by the microprocessor it will understud by the jvm only . we con't execute .class file without jvm . but we can execute .exe file without c-compiler .


Why you start java program by class?

without class non of the folder can run so the java program should start in class we can use the class without object in java


What is the file extension of an applet?

An applet is a Java application, this saves files in a .class extension