
Explore Java from basics to advanced topics, including loops, arrays, encapsulation, inheritance, polymorphism, collections, lambda expressions, streams, io, socket programming, and multithreading for beginners and interview prep.
Compare Java with C and C++, noting C++ is a superset of C; Java omits pointers and preprocessor features, emphasizes robust object oriented programming, and supports multithreading.
Compare C and Java to show Java's robustness and strict boundary checks, preventing out-of-bounds and type errors, and enforcing initialization and unreachable code rules.
Explore portability by contrasting executable files on Windows with porting the source code to Unix through compilation, highlighting compiler, linker, and native code concepts.
Java compiles source to bytecode, runs on any platform through the JVM, delivering write once, run anywhere with JVM managing memory, security, and threads.
Download and install Java SE 25 from Oracle, choose the Windows installer, run the setup, and verify the JDK includes the javac compiler and the java runtime.
Install Java SE and set up Eclipse as your integrated development environment, downloading the Eclipse installer, selecting the Java developers package, and configuring your JDK and workspace.
Create a Java project in Eclipse, choose JDK 25, create basics/hello with a main method, run hello world, then print numbers 1 to 10 and format the code.
Explore Java primitive types: byte, short, and long with sizes (short two bytes, long eight bytes); char uses two bytes for Unicode consistency across languages; boolean is JVM dependent.
Learn how Java identifiers use letters, digits, underscore and dollar. Avoid starting with a digit; begin with $ or _; keywords cannot be used for names.
Identify the five literal types: integer, floating point, character, boolean, and string, and explain how underscores, binary, hex, octal, and decimal bases, and the float suffix influence literals in Java.
Learn about text blocks in Java, a multi-line string feature using triple quotes to delimit lines, with escapes like backslash n and backslash s to suppress newlines and control spaces.
Explore Java operators, including arithmetic, assignment, relational, and logical operators, with a focus on short-circuit behavior and when to use && and || versus their bitwise counterparts.
Create a basic Java program in the basics package that reads a number from the keyboard using a scanner, prints its square with printf, and closes the scanner.
Explore if statements and switch constructs in Java, including braces, nested conditions, and fall through, plus enhancements like switch with strings, switch expressions, and yield.
Learn how the while loop works in Java, testing a condition and executing a block of statements. See an example that prints and increments i from 1 to 10.
Explain that a do while loop executes at least once, then checks the condition to repeat; unlike while, it may execute zero times.
Explore how a for loop in Java uses initialization, condition, and updation to repeat statements until the condition is false, with the loop variable scoped to the loop.
Learn how break and its optional label terminate the current or outer loops, and how labeled break targets specific loops, with labeled continue for the next iteration.
Explore using printf in Java to format output with System.out.printf, compare it with print and println, and understand Java's strict type safety, such as not printing a double with %d.
Create a scanner for keyboard input and read values with nextInt, nextDouble, nextLine, and more, then close the scanner to avoid warnings and potential issues.
Learn how to declare and create Java arrays, select data types, and use a variable size with the length property. Discover default zero initialization and built-in sort and search utilities.
Explore how Java creates and resizes arrays, how the JVM's garbage collector automatically releases unused memory, and how to iterate arrays with the enhanced for loop.
Explore defining methods beside main in Java, including public static void functions, returning values, and using variable number of arguments to pass multiple values as an array.
Learn to pass and access command line parameters in Java with main(String[] args), handle missing inputs with a default hello guest, and run programs from the command line.
Explore object oriented programming in Java, focusing on encapsulation, inheritance, and polymorphism. Learn how encapsulation places data and code inside a class, enabling controlled access and easier debugging.
Learn to design a Java class using UML diagrams, define a private value, implement increment and decrement plus getValue, create objects with new, and follow naming conventions.
Explore constructors that initialize private fields when creating objects, replacing init, and use a get net fee method to compute tax-adjusted fees.
Explore how overloading methods in Java lets the same method name handle different parameter lists, enabling compile-time polymorphism and cleaner code through varying arguments and constructors.
Demonstrates a Java savings account class with overloaded constructors, deposit and withdraw operations, balance retrieval, and a print method, including a test class in the same file.
Explore how object references hold memory addresses, how the equals operator compares addresses rather than objects, and how assignment copies references, not the objects themselves.
Learn how arrays of objects differ from primitive arrays, where arrays hold references initialized to null rather than objects themselves, and you must create objects and assign them to elements.
Explore the this reference in Java, and how it links invoking objects to their instance variables, and why using this for parameters and fields improves readability and prevents mistakes.
Learn how to call one constructor from another in Java, using this to reuse constructor logic and avoid duplicating similar code with an example like this(title, 36, 3).
Understand static variables as class variables in Java, replacing hard coded values with a single shared tax rate. Apply this to cases like minimum balances in savings accounts.
clarify static methods in Java, why they use the class name, not an object. show the absence of this reference and that instance variables cannot be accessed, with math.abs.
Explain why main is static by showing the JVM calls className.main to run the program. Static enables invoking the method with the class name and handling command line arguments.
A final variable acts like a constant after one assignment. Declare it with final, often static, to share across objects; if not initialized at declaration, initialize it in the constructor.
Explore a Java employee class with name, salary, and HR percentage, using static members and a static method, illustrated by UML concepts and page 78 code.
Learn how inheritance in Java enables reusability by deriving subclasses from a superclass and establishing is-a relationships between related classes, across shapes, people, and vehicles.
Master Java inheritance basics, protected fields, single inheritance with extends, and using super to pass constructors. Understand overriding and the @Override annotation to customize subclass printing behavior.
Explore Java inheritance by building a product hierarchy with imported and discounted products, implement constructors, override print, and calculate net price after tax and discount using single inheritance.
Design and implement shape classes for circle and rectangle in Java, storing coordinates, radius, length and width, with constructors, methods for area and circumference, and a test class with main.
Explore the difference between is-a and has-a relationships in Java and how to implement inheritance versus association. See how a customer has an address through a composed address object.
Explore upcasting and downcasting in Java by showing how a superclass reference can point to subclass objects, enabling runtime polymorphism.
Explore how runtime polymorphism decides which print method to call at run time based on the object p points to, using upcasting and dynamic method dispatch.
Explore how abstract methods enforce overriding across a product class hierarchy, and how runtime polymorphism selects get net price implementations for imported and discounted products.
Explore how an abstract shape defines area and implements it in circle and rectangle, using overridden methods to demonstrate runtime polymorphism and dynamic method dispatch.
Learn how the final keyword governs variables, methods, classes, and parameters, and how the abstract keyword drives subclass overrides in an employee hierarchy with regular and consultant roles.
Demonstrate how sealed classes control inheritance in Java by listing permitted subclasses with permits. Explain how subclasses can be final, non-sealed, or sealed.
Multi-level inheritance lets a subclass have another subclass, forming any number of levels under a single superclass, while Java forbids multiple inheritance due to ambiguity.
Explore initialization blocks in Java, including object init blocks and static init blocks, and learn their execution order as the Java class loader loads the class and you create objects.
Java's math class is a final utility of static methods for absolute value, min, max, rounding, and square root, with overloads for numeric types and constants like pi.
Explore the arrays class in Java, using static methods to sort, fill, copy, and perform binary search on generic arrays. Example rounds long values, sorts them, and checks for 30.
Discover the Java string class, its immutability, and how to create strings, then master common methods like length, charAt, startsWith, endsWith, equals, indexOf, substring, split, join, trim, and isBlank.
Discover how StringBuffer provides mutable strings in Java, with methods like append, insert, delete, and reverse, plus set character, demonstrated through an Oracle example.
Explore the string joiner class, which joins strings with a delimiter and optional prefix and suffix, including two constructors, and demonstrates with a comma and brackets.
Explore how every Java class inherits from the object class, override toString to display name and age, and implement equals with upcasting and downcasting for data-based comparisons.
Use the instanceof operator to safely check an object's type before downcasting, preventing class cast errors, and apply pattern matching for instance of to check and cast in one step.
Override toString and equals in the time class to compare total seconds and display hours:minutes:seconds with leading zeros via printf-like formatting.
Learn how the hashCode contract requires equal objects to have the same hash code and how overriding hashCode to return age fulfills this rule.
Explore Java records as final, data-centric classes created with the record keyword. They auto-generate constructor, getters, toString, equals, and hashCode, while keeping fields final.
Discover how Java nine introduces compact strings that use byte arrays for latin one characters and use char arrays for others, with automatic, transparent memory savings.
Explore the Java eight date time api, focusing on local date, local time, local date time, and year month, with parsing, date time formatter, and chrono unit and period calculations.
Read five date strings from the user and convert them to local dates using java.time and a date time formatter with a pattern. Sort and print them in the format.
Learn how primitive types are passed by value and stored on the stack, while objects are passed by reference, stored on the heap, and managed by garbage collection.
Explore wrapper classes for primitive types, and understand boxing and auto boxing, unboxing and auto unboxing, plus upcasting and downcasting in Java.
Explore jshell, a Java command-line tool for writing and testing simple statements quickly. Import java.time.*, print with System.out.println, use implicit typing, tab completion, slash commands like /exit, and Ctrl-R search.
Explore Java interfaces as a standardization tool, defining abstract methods for implementing classes, and learn to use, extend, and implement multiple interfaces, with default and static methods.
Explore functional interfaces with a single abstract method, enabling lambda expressions, and learn about marker interfaces like serializable and private interface methods.
Compare the similarities and differences between abstract class and interface, including object creation, instance variables, and inheritance rules. Clarify how object references relate to implementing classes and subclass objects.
Learn how to make objects sortable by implementing the comparable interface in a time class, define compareTo using total seconds, and enable array sorting.
Learn how Java supports nested classes, including static member, non-static inner, method local, and anonymous inner classes, and when to use each to access outer private members.
Explains what a package is, how to create and access it, and how to use public versus package-level classes, imports, and fully qualified names.
Shows that java.lang is automatically imported, so common classes like string and system are accessible without explicit imports. It notes that star imports bring classes from a package, not subpackages.
Explore how the default package works in Java, why omitting a package name confines classes to the default package, and how java.lang is automatically imported while other packages require imports.
Explore access modifiers in Java, including private, public, protected, and default, and how packages determine accessibility inside and across classes. See why public methods accompany private variables to control access.
Learn to create and use jar files, Java archives that bundle classes into a single file, and how the JVM uses classpath to access libraries.
Explore static imports in Java by importing static members like Math.PI, Math.abs, and System.out to write more compact code, while weighing the trade-off of reduced readability.
Explore enumeration in Java by defining a set of constants with the enum keyword, using payment modes and other examples to improve readability.
Learn to handle runtime errors in Java using try and catch blocks to keep programs running, and recognize common exceptions like number format, division by zero, and array index issues.
Learn to build a robust Java program that sums user-entered marks using exception handling, clearing the input buffer, and balancing nextInt with string parsing to prevent crashes.
Explore Java exceptions by comparing checked and unchecked types, their hierarchy from throwable to runtime exception, and strategies to handle or propagate them with examples like parseInt and thread sleep.
Explain how try, catch, and finally blocks guarantee execution of cleanup code, even when exceptions occur, including scenarios with no exception, handled exceptions, and unhandled exceptions.
Order catch blocks from most specific to most generic to avoid unreachable code, handling number format exception and arithmetic exception before a general exception.
Create user-defined exceptions by extending exception, use throw and throws, and handle with try/catch/finally to communicate failures such as a stack full exception.
Explore how assertions test code behavior in Java, using assert statements to verify conditions, raise assertion errors on false expressions, and enable assertions at runtime.
Explore multithreading in Java by creating main and child threads, understanding run method, and choosing between extending Thread or implementing Runnable to run tasks concurrently.
Explore the life cycle of a thread, from ready to run and running to dead, with time sharing and non runnable states like sleep and block scenarios.
Explore the thread life cycle from ready to run to running and dead, including sleeping, io blockers, and join waiting, with daemon threads and basic thread controls.
Learn how thread synchronization prevents data corruption when multiple threads access a stack's push and pop operations by using synchronized methods and the monitor concept.
Shows how synchronization guards a shared print method used by two threads on one data object, ensuring one thread prints 1–5 before the other begins.
Compare string buffer and string builder in Java, noting string buffer is synchronized for multi-thread safety, while string builder is faster in single-thread scenarios, and strings are immutable.
Are you ready to master Java - the world’s most popular and versatile programming language?
Whether you are a beginner stepping into Java programming or someone looking to strengthen your Java skills, this course will take you from the fundamentals to advanced features of modern Java.
In this course, you will learn Java step by step, starting from basic syntax and data types, and progressing through Object-Oriented Programming (OOP), interfaces, exception handling, multithreading, I/O streams, collections, and advanced topics such as lambda expressions, streams, records, and sealed classes introduced in recent Java versions.
Through practical examples and hands-on coding, you will gain the confidence to write, debug, and optimize Java programs. You’ll also explore real-world concepts like networking, serialization, and working with the Java Standard Library to build robust and scalable applications.
By the end of the course, you will not only understand how Java works but also how to apply it effectively to solve problems, structure applications, and prepare for technical interviews or professional projects.
What you’ll learn:
Core Java fundamentals: syntax, control structures, arrays, and data types
Object-Oriented Programming (OOP): encapsulation, inheritance, polymorphism
Advanced OOP features: abstract classes, sealed classes, and records
Working with Java libraries: Strings, Dates, Wrapper classes, Math, and Objects
Interfaces: default, static, and private methods
Packages, access modifiers, and enumerations
Exception handling: built-in and custom exceptions
Multithreading and synchronization
Input/Output (I/O) streams, NIO, and file handling
Networking: server-client sockets and working with URLs
Collections framework: List, Set, Map, Generics, and utility classes
Regular Expressions for pattern matching
Functional programming with Lambda Expressions and Streams
Who this course is for:
Beginners who want to learn Java programming from scratch
Students preparing for university-level Java courses
Developers looking to strengthen their Java fundamentals and learn modern features
Professionals preparing for job interviews or certifications in Java