|
Post by mostafmsd2 on Dec 20, 2023 3:43:14 GMT
Otherwise, the virtual machine simply will not find it. Our main method contains only one line, which outputs the text Hello, world! On the console! Before compiling, save the written code to a file. The file name must match the class name up to uppercase Java is a case sensitive language. So, we open a command prompt or terminal and first call the compiler javac and then the JVM virtual machine java. C Users User javac Hello. World java C Users User> java ! After compilation, a HelloWorld class binary file will appear containing the bytecode. The name of this file without the Phone Number List extension is passed as a parameter when calling the virtual machine. As a result, we see the line Hello, world! This is the result of the program. Java Programming Language Version History June Beginning of the Java programming language project. JDK. January JDK. February J SE. December J SE. May J SE. February J SE. September Java SE December Java SE July Java SE March , Java SE September , Java cross platform language Java code written on one platform that is, the operating system can run unchanged on other platforms. The Java Virtual Machine JVM is used to run Java. The JVM processes the byte code, then the processor processes the code received from the JVM.
|
|