Programming in Java
Programming is mostly all about writing code in High-Level languages like Java, C++, Python & so on. The set of statements written in a text editor like NotePad ++ or Eclipse is called the source code. The thing is that Computers don’t actually understand these High-Level Languages. The only thing they understand is machine code. Machine code, also known as machine language, is the elemental language of computers. It is read by the computer's central processing unit (CPU) and is composed of digital binary numbers.
⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀
A compiler/Interpreter is a tool that translates source code into another language like Machine Code. Each type of CPU uses a different Machine Language (because of their architecture) which means that the same executable file created by the compiler won’t work on different platforms. The real difference between a compiler and an interpreter is how they go about things. The compiler will actually scan the whole program and translate it as a whole into machine code while the interpreter translates one program statement at the time during run-time. ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀
Java is different. Java’s compiler goes from source code to byte code. The Java interpreter executes the JVM and goes from bytecode to machine code depending on the CPU you are working with. ⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀

Comments
Post a Comment