DEV Community

Cover image for πŸš€ Day 2 of My Automation Journey – Understanding JRE, JVM, JIT & Data Types
bala d kaveri
bala d kaveri

Posted on • Edited on

πŸš€ Day 2 of My Automation Journey – Understanding JRE, JVM, JIT & Data Types

On Day 1, I learned about JDK and how a .java file becomes a .class file.

Today, we moved to the second level of translation in Java and also started learning about Data Types.

πŸ” Second Level of Translation (Platform Dependent)
After JDK creates the .class file (Bytecode), what happens next?

This is where:

JRE
JVM
JIT

come into action.

🧩 JRE – Java Runtime Environment
JRE provides the environment required to run Java programs.

It contains:

Required libraries
Supporting files
Predefined .class files

Without JRE, Java programs cannot run.

βš™οΈ JVM – Java Virtual Machine
JVM is responsible for:

Running the .class file
Managing memory
Converting bytecode into machine-understandable instructions
It acts like a bridge between Java and the operating system.

⚑ JIT – Just In Time Compiler

JIT improves performance.
It converts bytecode into native machine code (0s and 1s) at runtime, making execution faster.

πŸ’» Compiling and Running a Java Program
Today we also practiced running Java programs manually using Command Prompt.

To Compile:

javac FileName.java
Enter fullscreen mode Exit fullscreen mode

To Run:

java FileName
Enter fullscreen mode Exit fullscreen mode

Important:

Do NOT include .class while running.

Just type the file name.

πŸ“¦ What is a Data Type?
Data Type is like a container.

It defines:

What type of data we store

How much memory it uses

Different data types store different types of values.

πŸ”’ Numeric Data Types

Integer Types:

byte
short
int
long

Example:

int age = 25;
long distance = 100000L;
Enter fullscreen mode Exit fullscreen mode

Decimal Types:

float
double

Example:

float price = 10.5f;
double salary = 10000.75;
Enter fullscreen mode Exit fullscreen mode

πŸ”€ Character Type

char

Example:

char grade = 'A';
Enter fullscreen mode Exit fullscreen mode

βœ… Boolean Type

boolean

Example:

boolean isJavaFun = true;
Enter fullscreen mode Exit fullscreen mode

Only two values:

true
false

🧠 Simple Understanding of Data Types
Our trainer explained it in a very simple way:

Imagine different water bottles:

1 liter bottle
5 liter bottle
10 liter bottle

You cannot store 10 liters in a 1 liter bottle.

Similarly:

Small values β†’ small data types
Large values β†’ large data types
Choosing the correct data type is important.

🎯 My Learning Reflection – Day 2
Today I understood:

βœ” Java has two levels of translation
βœ” How JRE, JVM, and JIT work
βœ” How to compile and run Java manually
βœ” What data types are and why they matter

Step by step, I am building my foundation.

My goal remains the same:
To become a Master in Automation Testing using Selenium and Playwright.

Strong basics in Java = Strong automation skills.

πŸ‘¨β€πŸ« Trainer: Nantha from Payilagam

πŸ€– A Small Note
I used ChatGPT to help structure and refine this blog while ensuring the concepts remain aligned with my trainer’s explanations.

Top comments (0)