Home  >  Article  >  Java  >  What is the extension of java source file?

What is the extension of java source file?

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-07-09 10:38:4949591browse

The extension of the java source file is ".java"; compile it with javac to generate a bytecode file with the suffix ".class" and save it in the same directory as the source program. If the source code has Errors will be pointed out line by line. After correcting the errors, recompile until the ".class" bytecode file is generated.

The operating environment of this tutorial: windows7 system, java10 version, DELL G3 computer.

The java source file extension is .java.

The file extension of compiled java is .class.

The Java source program we compiled is saved as. java suffix, and then compile it with javac (Java language compiler) to generate the suffix name. The bytecode file of the class is saved in the same directory as the source program. If there is an error in the source code, the error will be reported. The error will be pointed out line by line. We will find and modify the error according to the report, and recompile until it is generated. class bytecode file.

What is the extension of java source file?

Extended information:

The full name of the class file is Java class file, which is mainly used in terms of platform independence and network mobility. Java is better suited for the web. Its task in terms of platform independence is to provide Java programs with services in binary form that are independent of the underlying host platform.

This file breaks the tradition followed by languages ​​such as C or C. Programs written in these traditional languages ​​are usually compiled first and then concatenated into separate binary files that specifically support specific hardware platforms and operating systems. .

Recommended related video tutorials: Java video tutorial

The above is the detailed content of What is the extension of java source file?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn