GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Java Tutorial
  • Advanced Java
  • Interview Questions
  • Exercises
  • Examples
  • Quizzes
  • Projects
  • Cheatsheet
  • DSA in Java
  • Java Collection
  • JavaFX
  • Swing
  • Spring Boot
  • Apache Kafka

This view

  • Original page
  • New address

GeezerVison is showing www.geeksforgeeks.org — Introduction to Java - GeeksforGeeks

geeksforgeeks
search icon
  • Courses
  • Tutorials
  • Interview Prep
  • Java Tutorial
  • Advanced Java
  • Interview Questions
  • Exercises
  • Examples
  • Quizzes
  • Projects
  • Cheatsheet
  • DSA in Java
  • Java Collection

Introduction to Java

Last Updated : 4 Nov, 2026

Java is a high-level, class-based, object-oriented programming language developed by Sun Microsystems in 1995 and now maintained by Oracle.

  • Java source code is compiled into bytecode, which is executed by the Java Virtual Machine (JVM).
  • Java is a general-purpose language used for developing applications of different types.

Features of Java

Java provides several features that make it suitable for developing reliable, portable, and scalable applications.

features_of_java
Features of Java
  • Object-Oriented: Supports classes, objects, inheritance, encapsulation, polymorphism, and abstraction.
  • Platform Independent: Java bytecode runs on different operating systems with a compatible JVM.
  • Robust: Provides strong type checking and exception handling to improve reliability.
  • Secure: Includes bytecode verification and built-in security APIs.
  • Multithreading: Supports the concurrent execution of multiple tasks.
  • Rich Standard Library: Provides APIs for collections, file handling, networking, and database connectivity.
  • Automatic Memory Management: Uses garbage collection to reclaim memory occupied by unreachable objects.
  • High Performance: Uses Just-In-Time (JIT) compilation to optimize program execution.

Understanding Hello World Program

A Hello World program introduces basic Java syntax and helps beginners understand how a Java program works.

Traditional Hello World Program

This is the standard approach used in Java and works in all Java versions.

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

Output
Hello World!

Simplified Hello World Program (Java 24+)

Java 25 allows developers to write simple programs without explicitly declaring a class or using the traditional public static void main(String[] args) method.

Java
class Geeks{
    void main() {
        System.out.println("Hello, World!");
    }
}

Output
Hello, World!

This simplified syntax reduces boilerplate code and makes it easier for beginners to write their first Java programs.

Note: In Java 24, simple source files and instance main methods were preview features and required preview features to be enabled. The feature was finalized in Java 25.

To compile and execute these programs, follow our How to Run a Java Program

Structure of a Java Program

The structure of a Java program defines the standard format for writing Java applications and includes essential components required for program execution.

Program

Uses of Java

Java is widely used to develop applications across different platforms and industries. Some common uses include:

  • Mobile Applications: Used to develop Android applications and maintain existing Android projects.
  • Desktop Applications: Used to build graphical applications using JavaFX and Swing.
  • Web Applications: Used to develop web applications and REST APIs using frameworks such as Spring Boot.
  • Enterprise Applications: Used to build banking, e-commerce, and business management systems.
  • Game Development: Used to create games with frameworks such as LibGDX and jMonkeyEngine.
  • Big Data Applications: Used in distributed data processing and event-streaming systems such as Apache Hadoop and Apache Kafka.
  • Cloud Applications: Used to develop cloud-based applications, microservices, and backend services.
  • IoT and Embedded Systems: Used to develop applications for supported embedded devices and connected systems.
  • Database Applications: Uses JDBC to connect with relational databases and perform database operations.
Comment

Explore

    Basics
    • Introduction3 min read
    • Variables2 min read
    • Data Types7 min read
    • Operators7 min read
    • Decision Making5 min read
    • Methods7 min read
    • Arrays7 min read
    • Strings5 min read
    OOP & Interface
    • Introduction6 min read
    • Constructors6 min read
    • Encapsulation3 min read
    • Inheritance8 min read
    • Polymorphism5 min read
    • Abstraction5 min read
    • Interfaces8 min read
    Collections
    • Collection class9 min read
    • Collection Interface5 min read
    • List Interface8 min read
    • Set Interface5 min read
    • Queue Interface5 min read
    • Map Interface in Java6 min read
    • Iterator4 min read
    Advance Java Concepts
    • Exception handling6 min read
    • Java Multithreading Tutorial3 min read
    • Synchronization in Java9 min read
    • File handling6 min read
    • Method References3 min read
    • Java 8 Stream Tutorial7 min read
    • Memory Management4 min read
    • Garbage Collection in Java6 min read
    • Networking6 min read
    • JDBC5 min read
    Practice Java
    • Interview Questions15+ min read
    • Programs6 min read
    • Practice Problems5 min read
    • Quiz1 min read
    • Project Ideas15+ min read
    Courses
    • Java Backend Course2 min read
    • Placement 360 Course2 min read
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.