UrbanPro
true
default_background

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors
✕

Search in

Introduction to Java language, programming model and environment

B
Bobby Malik
1 day ago 0 View Comments0

Introduction to Java

What Is Java?

Java is a high-level, general-purpose, object-oriented programming language. It was developed by James Gosling and his team at Sun Microsystems in the mid-1990s and is now maintained by Oracle.

Java is designed around one key idea:

“Write Once, Run Anywhere” (WORA)

This means that a Java program written on one operating system—such as Windows—can run on another operating system—such as Linux or macOS—without changing the source code. This is possible because Java programs are not executed directly by the operating system. Instead, they run on the Java Virtual Machine (JVM).

Java is widely used because it is:

  • Platform-independent

  • Object-oriented

  • Secure and robust

  • Multithreaded

  • Scalable

  • Backed by a large ecosystem and community

Where Java Is Used

Java is used across many types of software systems, from small desktop tools to very large enterprise applications.

1. Enterprise Applications

Java is one of the most popular languages for large business systems. Banks, insurance companies, e-commerce platforms, and government systems often use Java because it is stable, secure, and scalable.

Examples include:

  • Banking and payment systems

  • Insurance platforms

  • Customer management systems

  • Inventory and billing systems

  • Enterprise web applications

2. Web Applications

Java is commonly used on the server side of web applications. Frameworks such as Spring and Spring Boot make it easier to build REST APIs, microservices, and web backends.

For example, a website may use HTML, CSS, and JavaScript in the browser, while Java handles business logic, user authentication, database operations, and API services on the server.

3. Android Development

Java has historically been one of the main languages for Android application development. Although Kotlin is now also widely used, many existing Android applications and libraries are written in Java.

4. Big Data and Data Engineering

Java is important in the big data ecosystem. Many popular data-processing tools are written in Java or run on the Java Virtual Machine.

Examples include:

  • Apache Hadoop

  • Apache Spark

  • Apache Kafka

  • Elasticsearch

If you work with large-scale data processing, distributed systems, or data pipelines, Java knowledge can be very useful.

5. Desktop Applications

Java can be used to build desktop applications using libraries and frameworks such as:

  • JavaFX

  • Swing

  • AWT

These are less common today than web and mobile applications, but Java desktop applications are still used in internal business tools and specialized software.

6. Embedded and IoT Systems

Java is also used in some embedded systems, smart cards, set-top boxes, and Internet of Things (IoT) devices, especially where portability and security are important.

How Java Works: Source Code to Execution

When you write a Java program, you usually create a file with a .java extension. For example:

java
 
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, Java!"); } }

This file is called source code.

The execution process is:

text
 
HelloWorld.java | | Java Compiler (javac) v HelloWorld.class | | Java Virtual Machine (JVM) v Program Output

Step 1: Write Source Code

You write human-readable Java code in a .java file.

Example:

java
 
System.out.println("Hello, Java!");

Step 2: Compile the Code

The Java compiler, called javac, converts the .java source file into bytecode.

Bytecode is stored in a .class file.

Example:

text
 
HelloWorld.java -> HelloWorld.class

Bytecode is not specific to Windows, Linux, or macOS. It is an intermediate format understood by the JVM.

Step 3: Run the Program

The JVM reads the bytecode and executes it on your specific operating system.

This is why the same .class file can run on different platforms, provided each platform has a compatible JVM.

JDK, JRE, and JVM

Beginners often confuse JDK, JRE, and JVM. They are related but serve different purposes.


 
JDK
├── JRE
│ ├── JVM
│ └── Core Libraries
└── Development Tools
 
├── javac
├── java
├── javadoc
└── other tools

JVM: Java Virtual Machine

The JVM (Java Virtual Machine) is the engine that actually runs Java bytecode.

Its main responsibilities are:

  • Loading .class files

  • Verifying bytecode

  • Executing the program

  • Managing memory

  • Performing garbage collection

The JVM makes Java platform-independent. Different operating systems have their own JVM implementations, but they all understand the same Java bytecode.

Simple way to remember it:

The JVM runs Java programs.

JRE: Java Runtime Environment

The JRE (Java Runtime Environment) is what you need to run an already-compiled Java application.

It includes:

  • The JVM

  • Core Java libraries

  • Supporting runtime files

If you only want to run a Java application—such as a desktop tool or a compiled program—you generally need the JRE.

Simple way to remember it:

The JRE provides the environment needed to run Java programs.

JDK: Java Development Kit

The JDK (Java Development Kit) is what you need to develop Java applications.

It includes everything in the JRE, plus development tools such as:

  • javac — the Java compiler

  • java — the command used to run Java programs

  • javadoc — documentation generator

  • jar — tool for packaging Java files

  • Debugging and monitoring tools

If you want to write, compile, and run Java code, install the JDK.

Simple way to remember it:

The JDK is for Java developers.

JDK vs JRE vs JVM

 
Component Full Form Main Purpose Who Needs It?
JVM Java Virtual Machine Executes Java bytecode Required by every Java program
JRE Java Runtime Environment Provides the environment to run Java applications End users running Java applications
JDK Java Development Kit Provides tools to develop and compile Java programs Java developers

A useful comparison is:

text
 
JDK = Development tools + JRE JRE = JVM + Runtime libraries JVM = Executes bytecode

Why Platform Independence Matters

In many languages, compiled programs are closely tied to a specific operating system and processor architecture. A program compiled for Windows may not run directly on Linux.

Java solves this using bytecode and the JVM.

text
 
Java source code | v Platform-independent bytecode | v Platform-specific JVM | v Runs on Windows, Linux, or macOS

So Java does not eliminate platform differences completely. Instead, it moves the platform-specific part into the JVM.

Key Takeaways

  • Java is a popular, object-oriented, platform-independent programming language.

  • Java is used in enterprise software, web backends, Android apps, big data systems, desktop tools, and embedded systems.

  • Java source code is compiled into bytecode.

  • The JVM executes bytecode and enables “Write Once, Run Anywhere.”

  • The JVM runs Java programs.

  • The JRE is used to run Java applications.

  • The JDK is used to develop Java applications.

  • As a learner, you should install the JDK because it includes both the compiler and the runtime environment.

0 Dislike
Follow 1 Loading Spinner
Default Profile Photo

Please Enter a comment

Submit

Other Lessons for You

GIT
In software engineering, software configuration management (SCM) is the task of tracking and controlling changes in the software, part of the larger cross-disciplinary field of configuration management....
R

Necessity of Theory and Practical in Computer Science.
Upon studying a subject both theory and practical are important. Usually many schools concentrate more on theory and the marks not on the practical. Other and opposite kind of people prefer practical...
Profile Photo


Programing Languages Learning Tricks
You want to learn that new language or library or framework as soon as possible, right? That’s understandable. Fortunately, there are a handful of tips that can help you to better retain all of that...
H

Harshal G.

0 0
View Comments0

How to create Rest web services in Java
Web services are web application components that lets two different applications to communicate over the network.Let if an application which in written java provides web services can be communicated through...
Profile Photo
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more