Skip to content

University-Of-Sri-Jayewardenepura/Java

Repository files navigation

1. Introduction to Java Programming

  • Evolution of Java
  • Java Features
    • Simple, Portable, Object-oriented, Robust, High-performance, Dynamic, Secure, Multithreaded, Architecture-Neutral, Distributed.
  • Java Workflow
    • JVM, JRE, JDK.
  • Basic Syntax
    • Classes, Methods (main method), Comments (single-line, multi-line, Javadoc), Identifiers.
  • Compilation and Execution
    • javac and java commands.
  • User Input
    • Scanner class.

2. Data Types and Operators in Java

  • Data Types
    • Primitive (int, float, double, boolean, char).
    • Non-primitive (String, Array, Objects).
  • Type Casting
    • Widening (Implicit) and Narrowing (Explicit).
  • Operators
    • Arithmetic, Assignment, Comparison, Logical, Bitwise.

3. Control Statements in Java

  • Selection Statements
    • if-else, switch-case.
  • Iteration Statements
    • for, while, do-while, Enhanced for loop.
  • Jump Statements
    • break, continue, return.
  • Methods
    • Definition, Parameters, Arguments, Scope (Method and Block).

4. Introduction to Object Orientation

  • Software Crisis
  • OOP Advantages
    • Modularity, Reusability, Extensibility, Maintainability.
  • Core OOP Concepts
    • Objects, Classes, Instantiation, Reuse.
  • Attributes and Methods
    • Instance variables, Method calls.
  • Four Pillars of OOP
    • Encapsulation, Inheritance, Polymorphism, Abstraction.

5. Basic Object-Oriented Concepts

  • Classes and Objects
    • Definition, Instantiation (new keyword), Constructors (Default, Parameterized).
  • Methods
    • Instance methods, this keyword.
  • Constructors
    • Purpose, Overloading, this keyword usage.

6. Encapsulation

  • Definition
    • Data hiding, Access modifiers (public, private, protected, default).
  • Getter and Setter Methods
  • Class/Static Variables and Methods
    • static keyword, Usage scenarios.

7. Arrays in Java

  • Types of Arrays
    • One-dimensional, Multi-dimensional.
  • Declaration and Initialization
  • Common Operations
    • Accessing elements, Looping (for, Enhanced for), length property.

8. Strings in Java

  • String Creation
    • Literal vs. new keyword.
  • String Methods
    • length(), charAt(), concat(), substring(), toUpperCase(), etc.
  • String Immutability
  • StringBuilder and StringBuffer
    • Mutable strings, Thread safety.

9. Inheritance

  • Definition and Importance
  • Types of Inheritance
    • Single, Multilevel, Hierarchical.
  • super Keyword
  • Method Overriding
  • Access Modifiers in Inheritance

10. Polymorphism

  • Types
    • Compile-time (Method Overloading, Constructor Overloading).
    • Runtime (Method Overriding).
  • Examples
    • Hierarchical inheritance, Superclass reference to subclass objects.

11. Abstraction

  • Definition
    • Hiding implementation details.
  • Abstract Classes
    • Syntax, Abstract methods, Constructors.
  • Interfaces
    • Syntax, Multiple inheritance, Default and static methods (Java 8+).
  • Abstraction vs. Encapsulation

12. Exception Handling and Threading

  • Exceptions
    • Types: Checked, Unchecked, Errors.
    • Handling: try-catch, finally, throw, throws.
  • Threading
    • Thread lifecycle, Creation (extending Thread, implementing Runnable).
    • Synchronization, Inter-thread communication (wait, notify).

About

Object Oriented Programming with Java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages