Java Basics, Classes & OOP Concepts

7 min read JAVA 4 views

Introduction to Java Core

Java is a robust, class-based, object-oriented language designed for high portability ("Write Once, Run Anywhere"). It powers billions of devices, enterprise backends, and Android applications worldwide.

java Example
Run Code
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello, CodingRider Java Developer!");
        Car myCar = new Car("Tesla", "Model 3", 2024);
        myCar.drive();
    }
}

class Car {
    private String make;
    private String model;
    private int year;
    public Car(String make, String model, int year) {
        this.make = make; this.model = model; this.year = year;
    }
    public void drive() {
        System.out.println(make + " " + model + " is now cruising.");
    }
}

Related Tutorials