Courses / Complete Java Course by codesofrohan / Introduction / What is Java?

What is Java?

Before diving direct into the code, we must know what we are about to learn. The best answer to this question is:

Java is a high-level, object-oriented as well as platform-neutral programming language which was created by James Gosling. It was designed to create cross-platform applications. Imagine you are writing you code on windows operating system that can only runs on windows. In this case, you have to write another code for macOS user. But Java solve this extra work with its cross-platform adaptation.

Computer don't understand Java

Yes, that's true, but Java is a programming language that can be changed in binary language (0 and 1). And this binary language can be understood by the computer. Consider Java a bridge between you and your system. As a human you can learn Java, and there is a pre-built app javac (Java Compiler) which comes with JDK convert you code in to Bytecode. Then using that Bytecode JVM generates the Machine language (0 and 1) based on operating system, which can be understand by the system.

Java with a Real-Life Example

Imagine you have written a letter in English to a person who can only understand Hindi. Then you need a translator to translate that letter to Hindi.

Similarly:

  • You write code in Java.
  • Javac converts your code into Bytecode.
  • And JVM converts Bytecode into Machine language based on OS.
  • The computer executes the instructions and gives the desired output.

This translation process happens automatically using Java's runtime environment on JRE. We will have a look on how JDK internally works and what are these terms and there uses like JDK, JVM, JRE, JIT, etc. in this section(link will be attached to this).

🔖 Bookmark saved successfully!