... ArdiLand Institute of Technology Java Programming Language – Complete Beginner to Advanced Guide | Ardiland Institute of Technology
540-440-1540‬
USD ($)
$
United States Dollar
Br
Ethiopian Birr

Java Programming Language – Complete Beginner to Advanced Guide

Created by Adugna Asrat in Quick Notes 27 Mar 2025
Share

🚀 What is Java?

Java is a high-level, object-oriented, class-based programming language developed by Sun Microsystems and released in 1995. It’s widely used for web apps, enterprise software, mobile apps (Android), and backend systems.

Key Traits:

  • Platform-independent (Write Once, Run Anywhere)

  • Object-oriented

  • Secure and robust

  • Widely used in enterprise applications


🧩 1. 🧱 Java Basics

📦 What is a Variable?

A variable is a container for storing data values. Java is statically typed, so you must declare the type.

int age = 25;

String name = "Maya";


📊 What are Data Types?

Data types specify the size and type of variable values.

🔹 Primitive Data Types:

  • int, float, double, char, boolean, byte, short, long

🔹 Non-Primitive:

  • String, Array, Class, Interface, etc.


🖨️ Output in Java

System.out.println("Hello, Ardiland!");


➕ 2. 🔢 Operators

Arithmetic: +, -, *, /, %

⚖️ Relational: ==, !=, >, <, >=, <=

🧠 Logical: &&, ||, !

🖊️ Assignment: =, +=, -=, etc.


🔁 3. 🔍 Conditional Statements & Loops

✅ What are Conditional Statements?

Used to perform different actions based on conditions.

if (age >= 18) {

    System.out.println("Adult");

} else {

    System.out.println("Minor");

}


🔄 What is a Loop?

Loops repeat code blocks based on a condition.

👉 For Loop

for (int i = 0; i < 5; i++) {

    System.out.println(i);

}

👉 While Loop

int i = 0;

while (i < 5) {

    System.out.println(i);

    i++;

}


🧠 4. 🧩 Methods (Functions in Java)

🔹 What is a Method?

A method is a block of code that runs when it's called. Used for code reusability.

public static void greet(String name) {

    System.out.println("Hello " + name);

}


👨‍🏫 5. 🧱 Object-Oriented Programming (OOP)

🔸 What is a Class?

A class is a blueprint for creating objects. It defines properties and methods.

class Student {

    String name;

    int age;

}


🔸 What is an Object?

An object is an instance of a class.

Student s1 = new Student();

s1.name = "Christian";

s1.age = 20;


🔐 OOP Principles

  • Encapsulation – Hide data using private access

  • Inheritance – Child class inherits parent

  • Polymorphism – Many forms of the same method

  • Abstraction – Hide complex logic behind simple interfaces


📂 6. 🛡️ Exception Handling

❗ What is Exception Handling?

Java handles runtime errors using try, catch, and finally blocks.

try {

    int result = 10 / 0;

} catch (ArithmeticException e) {

    System.out.println("Cannot divide by zero");

}


🧰 7. 🔌 Arrays & Strings

📋 Arrays

int[] numbers = {1, 2, 3, 4};

✏️ Strings

String msg = "Hello";

System.out.println(msg.length());


🧵 8. Interfaces and Abstract Classes

🔹 What is an Interface?

An interface is a contract. A class must implement all of its methods.

interface Animal {

    void sound();

}

🔹 What is an Abstract Class?

An abstract class can have both implemented and unimplemented methods.


🌐 9. Applications of Java

💻 Desktop software

📱 Android development

🌐 Web backend (Spring, JSP)

🏢 Enterprise systems (banks, insurance)

🔌 Embedded systems

🚀 Big Data (Hadoop uses Java)


💼 Careers in Java

Role

Avg Salary (USD)

Java Developer

$60K–120K

Android Dev

$70K–130K

Backend Engineer

$75K–140K

Enterprise Architect

$90K–160K


🧪 Practice Question

Q: What will be the output?

int x = 10;

System.out.println(x > 5 && x < 15);


Answer: true – both conditions are satisfied.

Comments (0)

Share

Share this post with others