Learning Java/Introduction to Java: Difference between revisions

Content deleted Content added
Remi0o (discuss | contribs)
Remi0o (discuss | contribs)
Line 13:
One thing that distinguished Java from some other languages was its ability to perform across multiple operating systems without any extra code.
 
In these other languages, the source code, or code that is written by the developer, is compiled by a compiler directly into an executable file. The file is intended for a single operating system, so the developer would most likely have to compile seperateseparate programs for seperateseparate operating system.
 
Java is different in that it does not compile the code into native code. It creates bytecode out of the source code. Bytecode generally looks something like this:
<pre> a7 f4 73 5a 1b 92 7d</pre>
When the code is run by the user, it is processed by something called the Java Virtual Machine (JVM). The JVM is basicallyessentially an interpreter for the bytecode. It goes through the bytecode and runs it. There are different versions of the JVM that are compatible with each OS and can run the same code. There is virtually no difference for the end-user, but this makes it a lot easier for developers.
 
==Installing the JDK==