Explain the Compilation of Java Programs.
Advertisements
प्रश्न
Explain the Compilation of Java Programs.
स्पष्ट कीजिए
Advertisements
उत्तर
- Compilation of Java Programs is the process of converting Java source code into bytecode using the Java compiler
(javac). The Java source code is written in a file with the .java extension. - During compilation, the Java compiler checks the source code for syntax and other compile-time errors. If the program is free from compilation errors, the compiler generates a .class file containing bytecode.
- This bytecode is platform-independent and can be executed on any system having a compatible Java Virtual Machine (JVM).
Thus, compilation converts Java source code into bytecode, which can be executed by the JVM.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Variables and Expressions - EXERCISE [पृष्ठ १३१]
