DI04000021 · Semester 4 · 5G scheme
Object Oriented Programming-Java
Notes and solutions following the Gujarat Technological University (GTU) syllabus for DI04000021. Independent material — not issued by the university.
Materials
Complete Book
The whole syllabus, unit by unit, written for the exam.
Complete Book
51 pages
Premium Preview · 20 pages
PYQ Solutions
Past university papers, fully solved.
Solved past papers — detailed answers
27 pages · English + ગુજરાતી
Premium Preview · 4 pages
Syllabus units
Unit 1: Introduction to Java Programming
- Introduction to Java: Introduction to Java, Java Features, Java Applications
- Writing & Running First Program: JDK, JRE, JVM, Byte Code, Structure of a Java program (class, main()), Hello World program - compile & run.
- Data Types & Variables: Primitive types (byte, short, int, long, float, double, char, boolean), Declaring & initializing variables, The Scope and Lifetime of Variables, Type Conversion and Type Casting, Brief overview of Operators (Arithmetic, Bitwise, Rational, Logical, Assignment, Conditional, Ternary, Increment and Decrement).
- Control Flow: if-else (simple & nested & ladder), switch-case, for loop, while loop, do-while, Jump statements: break, continue
- Arrays: 1D arrays: declaration, initialization, traversal, 2D arrays: introduction
Unit 2: Object-Oriented Programming Concepts
- Principles of OOP: Abstraction, Encapsulation, Inheritance, Polymorphism
- Classes & Objects: Class, Object, Fields and Methods
- Constructors: Default Constructor, Parameterized Constructor, Constructor Overloading
- Important Keywords: this, static-static class, static block, static method, static variable
- Access Modifiers: public, private, protected, default
- Methods: Method Definition, Method Overloading
- Strings: String Class, Common String Methods (length(), charAt(), substring(), toUpperCase(), toLowerCase())
- Wrapper Classes: Wrapper Classes (Byte, Short, Integer, Long, Float, Double, Character, Boolean), Autoboxing, Unboxing
- User Input: Scanner Class, Command Line Arguments
- Garbage Collection: finalize() Method
Unit 3: Inheritance, Interfaces & Abstraction
- Inheritance: Concept of Inheritance, Need of Inheritance, Types of Inheritance, super keyword, Method Overriding, Dynamic Method Dispatch, Final Keyword
- Abstract Classes: Abstract Class, Abstract Methods, Rules of Abstract Class
- Interfaces: Need of interface, Interface Declaration, Interface Implementation, Multiple Inheritance using Interface, Default and Static Methods in Interface
- Packages: Defining a Package, Importing a Package, Built-in Packages (java.util, java.lang, etc.)
Unit 4: Exception Handling & Collections Framework
- Errors and Exceptions: Types of Errors (Compile-time, Runtime, Logical), Exception Hierarchy (Throwable, Exception, RuntimeException)
- Exception Handling: try block, catch block, finally block, throw keyword, throws keyword, Multiple catch blocks, Built-in Exceptions (ArithmeticException, NullPointerException, ArrayIndexOutOfBoundsException, etc.)
- Collections Framework: Need of Collections, Collection Hierarchy Overview, List Interface, ArrayList: introduction, add/remove/search elements, Set Interface, HashSet :introduction, unique elements, for-each loop
Unit 5: Modern Java Features
- Basic Overview of Java Language Version Updates: Recent Java Features and Basic Overview of major Java enhancements from Java 7 onwards (e.g., try-with-resources, lambda expressions, modules, records, pattern matching).
- Functional Features (Java 8 Intro): Lambda Expression - syntax and simple example (e.g. print list elements), Stream API - introduction with filter, map, forEach operations on a list.
- Introduction to AI with Java: Meaning of AI and Machine Learning: basic definitions, Role of Java in AI (used in enterprise apps, data handling, API integration), Basic overview of AI libraries in Java: Deeplearning4j (DL4J) - deep learning in Java, TensorFlow Java API - running pre-trained models
About this course
Object-Oriented Programming (OOP) has become the standard paradigm for developing modern software applications due to its ability to model real-world problems effectively. Introducing students to OOP using Java equips them with essential programming skills that are highly relevant in both academia and industry. Java is one of the most widely used programming languages, known for its platform independence (Write Once, Run Anywhere), security, and rich library support, making it a perfect language to teach the principles of OOP. By including OOP with Java in the curriculum, students will be able to understand the core OOP concepts, develop problem solving skills and industry relevant skills as Java is extensively used in enterprise applications, Android development, web development, and emerging fields like AI and Machine Learning.