Skillversitas

What is Java

Java is a high-level, object-oriented, class-based programming language developed by James Gosling at Sun Microsystems in 1995. It is now owned by Oracle and remains one of the most widely used languages in the world, with more than 3 billion devices running Java.

One of Java's main strengths is the Write Once, Run Anywhere (WORA) principle. Java code is compiled into bytecode that can run on any platform that has a JVM (Java Virtual Machine). This means a program written on Windows can run without changes on macOS, Linux, or any other operating system. The JVM translates the bytecode into machine language in real time.

The Java ecosystem is very extensive, with a complete standard library, popular frameworks such as Spring Boot and Jakarta EE, and advanced development tools such as IntelliJ IDEA and Maven. From large-scale web applications, banking systems, Android apps, to big data — it is all built with Java.

Main Features of Java:

  • Fully object-oriented (pure OOP)
  • Platform-independent — WORA (Write Once, Run Anywhere)
  • High security with sandboxing
  • Built-in multithreading
  • Automatic memory management (Garbage Collection)
  • Statically typed — data types are checked at compile time
  • Open source (OpenJDK)

Areas Where Java Is Used:

  • Enterprise Web Applications (Spring Boot, Jakarta EE)
  • Mobile Android Development (Kotlin/Java)
  • Banking & Financial Systems
  • Big Data & Analytics (Hadoop, Spark)
  • Cloud Computing & Microservices

Code Example

// Your first Java program
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
        System.out.println("Welcome to Java.");
    }
}

Code Explanation

The code above is the simplest possible Java program. Every Java file must have at least one class with the same name as the file (.java). The main method is the entry point of a Java program — without this method, the program cannot be run. public static void main(String[] args) means: public so it can be accessed from anywhere, static so it can be run without creating an object, void because it does not return a value, and String[] args for receiving command-line arguments. System.out.println() is the standard way to print text to the console.

Everyday Example

System.out.println() is often used for quick debugging. For example, you are building a simple calculator app for a small grocery store. You can print the intermediate result of each calculation step to the screen to make sure the code is working correctly:

public class StoreCalculator {
    public static void main(String[] args) {
        double totalSpent = 50000 + 25000 + 15000;
        double discount = totalSpent * 0.1;
        double finalTotal = totalSpent - discount;
        System.out.println("Total to pay: " + finalTotal);
    }
}

Summary

Java is a very powerful and versatile language with a mature ecosystem. With WORA support, high security, and a large global community, Java is a top choice for large-scale application development. Get ready to dive deeper into the upcoming lessons.