Introduction to Java - DSAasaanhai

Introduction to Java - DSAasaanhai

Introduction

  • Java is one of the most popular programming languages because it is used in a variety of technical fields such as app development, web development, client-server applications, and so on.
  • Java is an object-oriented programming language.

How Java Works?

The source code in Java is first compiled into the byte code, and then it is interpreted to machine code.

  • source code -> .java file (human readable)
  • byte code -> .class file
  • machine code -> 0 and 1

  • compiler compiled the entire file.

  • interpreter interpreted the file (line by line).

  • JVM - Java Virtual Machine = It is a Virtual machine that enables a computer to run Java programs.
  • JDK – Java Development Kit = Collection of tools used for developing and running java programs.
  • JRE – Java Runtime Environment = Helps in executing programs developed in JAVA.
  • JDK contains Java Virtual Machine (JVM) and Java Runtime Environment (JRE).

Installation