0% found this document useful (0 votes)
4 views2 pages

Understanding Java and JVM Basics

Uploaded by

Ankesh Halder
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Understanding Java and JVM Basics

Uploaded by

Ankesh Halder
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Start from 1hr

Java is a purely object oriented programming language.

Java is compiled into the bytecode and then interpreted to machine code.

JVM(Java Virtual Machine)-

It is:

1. A specification where working of Java Virtual Machine is specified. But


implementation provider is independent to choose the algorithm. Its implementation
has been provided by Oracle and other companies.

2. An implementation Its implementation is known as JRE (Java Runtime


Environment).

3. Runtime Instance Whenever you write java command on the command prompt to
run the java class, an instance of JVM is created.

JVM only understand bytecode. firstly we need to convert the java code into bytecode with the help of
java compiler. So we write code and the java code will be getting compiled into the bytecode and that
bytecode goes on the JVM and it will run.

In the project there can be thousand files but out of those all files there will be one file that JVM will
execute. So we need to specify the JVM which is our that one file so that one file need to have the main
method.

JRE(Java Runtime environment)- It is the implementation of JVM

JDK= JDK will provide us compiler and debugger, from which we can develop and compile and debugger
can debug.

Type casting-
Implicit Type casting-> automatically by JVM

Explicit Type casting-> Forcefully by programmer


If no loss is happening in the number then JVM will automatically do the type casting. like->

int 40 -> double 40.0 (automatic conversion)

if loss is happening then forceful

float 41.3-> int 41(forceful conversion)

Static Method-

Whenever we want to work with a Instance method or non-static method we need to create an object of
it if we need to call.

JVM only understand bytecode. firstly we need to convert the java code into bytecode with the help of
java compiler. So we write code and the java code will be getting compiled into the bytecode and that
bytecode goes on the JVM and it will run.

In the project there can be thousand files but out of those all files there will be one file that JVM will
execute. So we need to specify the JVM which is our that one file so that one file need to have the main
method.

You might also like