A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/java/introduction-to-java/ below:

Introduction to Java - GeeksforGeeks

Introduction to Java

Last Updated : 23 Jul, 2025

Java is a high-level, object-oriented programming language developed by Sun Microsystems in 1995. It is platform-independent, which means we can write code once and run it anywhere using the Java Virtual Machine (JVM). Java is mostly used for building desktop applications, web applications, Android apps, and enterprise systems.

Key Features of Java Understanding Hello World Program in Java

When we learn any programming language, the first step is writing a simple program to display "Hello World". So, here is a simple Java program that displays "Hello World" on the screen.

Java Hello World Program:

Java
// This is a simple Java program to print Hello World!
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

How does this work:

Java program execution follows this below simple flow:

Java Program Execution Flow

To understand Hello World program in detail, refer to article: Java Hello World Program

The comments are the notes written inside the code to explain what we are doing. The comment lines are not executed while we run the program.

Java Java
/*
This is a multi-line comment.
This is useful for explaining larger sections of code.
*/

To understand Java comments in detail, refer to article: Java Comments

Curly Braces and Indentation in Java

In Java, curly braces {} are used to define blocks of code. For example, the body of a class or method is enclosed within curly braces.

Example:

Java
public class Geeks{
    public static void main(String[] args) {
        {
            System.out.println("This is inside the block.");
        }

        System.out.println("This is outside the block.");
    }
}
Naming Conventions in Java

To understand Naming convention in Java in detail, refer to article: Java Naming Convention

Famous Applications Built Using Java What Can We Do with Java?

Java is used for:



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4