what is Java?
-->simple programming language.
--> platform independent.
-->OOPS -> object oriented programming structure.
--> Java is a widely used programming language for building web, desktop, mobile, and enterprise applications.
-->Secure and robust with strong memory management.
java simply called as JDK--> Java Development kit
JDK contains the JRE and JVM
JDK:
It is called as java compiler.
Its compiles the source file in to byte code.
ex: Home.java convert into Home.class
in terminal run command javac Home.java run this command
automatically create the Home.class file javac in c means Compiler
onece the compile the program run anywhere
JRE (Java Runtime Environment)
-->The Java Runtime Environment (JRE) traditionally refers to the components required to run a Java application.
-->It consists primarily of the JVM and the Java runtime libraries.
--> its main component JVM.
-->JRE is a software package that provides Java class libraries, JVM, and other components that are required to run Java applications.
-->JRE is the superset of JVM.
JVM Java Virtual Machine
-->JVM is an abstract machine that enables your computer to run a Java program.
-->When you run the Java program, Java compiler first compiles your Java code to bytecode. Then, the JVM translates bytecode into native machine code (set of instructions that a computer's CPU executes directly).
-->Java is a platform-independent language. It's because when you write Java code, it's ultimately written for JVM but not your physical machine (computer). Since JVM executes the Java bytecode which is platform-independent, Java is platform-independent.
public class Home{
public static void main (String[] args){
System.out.println("Hello java");
}
}
Its compile to the code create the Home.java file
again run the command line java Home program will execute





Top comments (0)