
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Jump into the Java masterclass to become a confident Java programmer, from basics to advanced concepts, remastered for JDK 17 with practical setup tips.
Remastered course upgrades all lessons to Java 17, offering powerful Java 17 features, downloadable slides, polished explanations, and ongoing future updates to stay current.
Enable auto or select 720p to maintain 1080p when possible for the java masterclass, and be patient as videos load to achieve the best viewing experience.
Enable and use subtitles to improve course comprehension by turning on captions, selecting languages, and relying on hand-edited English subtitles for accuracy to support your learning.
Log in to the q&a tab, click 'ask a question,' provide a clear title and detailed description with your code and errors, and search first for faster Java help.
Typing the code yourself builds problem-solving skills and Java muscle memory through active practice. Shadow me or dive in, and use the downloadable code to compare solutions.
Persist through challenges to become the programmer you dream of in this Java masterclass. Embrace a growth mindset and learn the four stages of learning to code to stay motivated.
Master long-term support concepts in Java by learning why LTS releases receive extended updates for years, how they stabilize production environments, and why JDK 17 remains the course's focus.
Install and configure JDK 17 and IntelliJ IDEA for Java development, explore editions, and set up cross-platform workflows on Windows, macOS, and Linux.
Install Java 17 (LTS) on Windows 10 or 11 by downloading the x64 JDK from java.sun.com and running the installer, noting 32-bit Windows 10 may need an older JDK.
Install Java SE 17 (LTS) JDK on macOS, choosing the ARM 64 or x64 DMG installer for Apple Silicon or Intel Macs, then run the .pkg to complete.
Install OpenJDK 17 on Ubuntu 22.04 using the terminal, run apt update, install openjdk-17-jdk, verify with java -version, and prepare for IntelliJ setup.
Verify your Java 17 installation and explore Java interactively with JShell, a REPL sandbox accessed from the command prompt or terminal. Learn key JShell commands and history navigation.
Start by printing 'Hello World' in JShell, then modify the statement to say 'Hello Tim', and learn to spot common errors like missing parentheses or quotes while practicing.
Define and initialize int variables, explore Java keywords and primitive data types, print values with System.out, and use expressions and operators in JShell to manipulate values in RAM.
Use variables in Java expressions to replace literals, compute sums across my first, second, and third numbers in JShell, and learn case sensitivity and the /vars command for tracking.
Explore Java’s primitive types, focusing on int and wrapper class Integer, uncovering min and max values, overflow and underflow, and using underscores to improve numeric readability.
Understand byte, short, and long data types in Java, their ranges and widths, plus using wrapper classes and the L suffix to print values and explore overflow.
Explore casting and arithmetic with Java primitive types (byte, short, long), learn when to cast results, understand min values, and use casting to convert int results to smaller types.
Create and manipulate byte, short, int, and long variables in Java. Explore multiple valid ways to compute expressions and understand casting and long literals.
Explore Java floating point numbers, compare float and double, learn their ranges and precision, understand decimal literals, suffixes F and D, and casting implications.
Explain how int, float, and double handle division and precision, showing truncation for integers and 2.5 for floats and doubles, with doubles offering greater accuracy.
Explore Java's char and boolean primitives, learn single-character storage with quotes, unicode, or decimal codes, and use booleans with is-prefixed names for true/false conditions.
Recap Java's eight primitive types and explain why string is a class, not primitive; explore string concatenation, immutability, and the difference with string builder for efficient text handling.
Java masterclass 2025 explores operators, operands, and expressions, demonstrating addition, multiplication, division, and modulus, and explaining how chars and strings interact, with code examples and comments.
Master abbreviating operators in Java, including postfix ++/-- and compound assignments like += and -=, with int and double examples to illustrate data-type effects.
Switch from jshell to an integrated development environment to boost productivity. Install and configure IntelliJ IDEA, and learn code completion, debugging, and version control.
Discover how an integrated development environment like IntelliJ IDEA simplifies writing, compiling, and running code, with built in error warnings and streamlined setup across Windows, Mac OS, and Linux.
Install and set up IntelliJ IDEA on Windows to write Java programs, learn to download the Windows exe, configure file associations, create shortcuts, and accept terms.
Install and set up IntelliJ IDEA on macOS, selecting the Apple Silicon or Intel version, download from JetBrains, and complete initial configuration to write, run, and debug Java programs.
Install and start IntelliJ IDEA on Ubuntu Linux using snap or tarball, then configure the ide to write and run programs.
Configure IntelliJ IDEA for Windows by linking the JDK, selecting Java as the project type, and enabling auto-imports, unambiguous imports on the fly, and optimize imports on the fly.
Configure IntelliJ IDEA for Mac by linking Oracle's JDK 25 to enable Java code. Set the IDE build system and enable auto-import plus show line numbers for easier learning.
Configure IntelliJ IDEA on Linux by linking the Oracle JDK 25, ensuring the IDE detects the JDK, and set the build system to IntelliJ.
Create your first Java project in IntelliJ, name it using upper camel case, write a hello world class with psvm snippet, and run it to see the hello world output.
Explore how IntelliJ displays and formats Java code, learn the roles of classes and the main method, and distinguish println from print for proper output.
Master conditional logic in Java by learning the if-then statement, the assignment operator and equality operator, boolean evaluation, and the importance of code blocks for clear program flow.
Explore advanced conditional logic in Java with equality and comparisons like greater than, greater than or equal to, less than, less than or equal to, plus the logical and operator.
Explore Java's logical and operator and logical or operator within conditional statements, and learn how operator precedence and parentheses clarify boolean expressions in code.
Demonstrates the difference between the assignment and equals operators in Java, fixes common int and boolean comparisons in IntelliJ, and introduces the not operator for concise boolean expressions.
Learn to use Java's ternary operator, a three-operand conditional, to replace simple if-then logic with concise expressions, such as testing car make and age-based text outputs.
Explore Java operator precedence through a hands-on challenge, using doubles, modulus, and parentheses to control evaluation order, and learn how precedence affects expressions and outcomes.
Explore the fundamentals of Java workflow by learning how methods group code with greater power than code blocks, building on expressions and statements.
Explore Java keywords and expressions, mastering reserved and contextual keywords, identifiers, and how expressions form statements and code blocks in practical IntelliJ examples.
Master how to write valid Java statements with semicolons, and improve readability through whitespace, indentation, multi-line statements, and code formatting with IntelliJ and Google Java conventions.
Master Java if statements with code blocks, else and else-if, using booleans and integers to control flow and print outcomes in score-based examples.
Copy and rename the main class in IntelliJ, implement final score calculation with level completed and bonus under an if gameOver check, and preview methods to avoid duplication.
Learn how Java methods reduce code duplication by encapsulating reusable blocks. Declare and invoke public static void methods, and pass parameters and arguments to customize behavior and improve maintainability.
Learn how to enhance Java skills by refactoring with a calculate score method and returning int values. Use method calls in expressions and print statements to improve code clarity.
Review how Java methods declare modifiers, return types (including void), parameters, and method bodies, enforce correct return statements, define signatures, support overloading, and handle the main method and args.
Create two Java methods to manage high scores: displayHighScorePosition prints a player's name and rank, and calculateHighScorePosition returns a number between 1 and 4 for a given score.
Learn to compare your IntelliJ code with downloaded solutions using side-by-side and unified views, highlight differences, and use local history to revert or restore earlier versions.
Explore in-browser coding exercises using Java 17 in this course, including a check number method that prints positive, negative, or zero in Udemy's editor.
Learn how Java uses method overloading to call same-named methods with different parameter signatures. A method signature includes name, parameter types, order, and count; return type does not affect it.
Implement and test overloaded methods named convertToCentimeters, converting inches and feet and inches to centimeters using 1 inch = 2.54 cm and 1 foot = 12 inches, and verify with sample cases.
Develop and test two overloaded getDurationString methods to convert seconds into hours, minutes, and seconds, with validation and clear string output.
This lecture adds validation to the duration formatting methods, ensuring non-negative minutes and seconds within 0 to 59, with test cases and code refactoring for clarity.
Explore control flow statements in Java, including switch, if-else, for, while, and do-while, and learn how to decide what runs and when.
Master switch statements in java by comparing values with case, break, and default, compare to if-else, group multiple cases, understand fall-through and type limitations.
Explore the evolution from traditional to enhanced switch statements, covering switch expressions with arrow syntax, default handling, and the yield keyword for returning values, plus backwards compatibility notes.
Practice building a traditional switch statement to map letters a-e to NATO words, using cases, breaks, and a default, while contrasting with the enhanced switch.
Learn how to convert a traditional switch to an enhanced switch expression in Java, map 0–6 to Sunday–Saturday, and handle invalid days with a default.
Master the for statement to automate repetitive tasks in Java, learning initialization, condition, and increment, and apply it to calculate interest rates while using break to exit loops.
Build and test a for loop based prime checker with an isPrime method. Use the modulo check, print primes, count them, and break after three primes for efficiency.
Complete the sum 3 and 5 challenge by looping 1 to 1000, printing numbers divisible by 3 and 5, breaking after five matches with final sum 225, using IntelliJ debugger.
Explore the for loop fundamentals in Java, including initialization, condition, and increment, with step-by-step iteration examples, pitfalls like infinite loops, and a note on the enhanced for loop.
Master while and do-while loops in Java by comparing them to for loops, learning how to use conditions, breaks, and continue to control iteration.
Create an isEvenNumber method using the remainder operator, then use a while loop to print even numbers from 5 to 20, skipping odds with continue and counting evens to five.
Learn how to implement a sumDigits method that sums digits of a positive int, returning -1 for negatives, using modulo 10 and integer division in a loop.
Recap the while loop and do-while loop, focusing on syntax, conditions, and execution order. Learn how continue and break affect iterations, and that do-while runs at least once.
Examine how local variables work in Java blocks, detailing scope inside for, if, and switch statements, when variables are in or out of scope, and best practices for narrowest scope.
Learn how a class acts as a template to create objects and how static and instance fields and methods differ, with wrappers for parsing numbers and interactive input.
Parse string data into numbers using Integer.parseInt and Double.parseDouble, then build an interactive console app that reads name and birth year with system.console or Scanner to compute age.
Learn to catch and handle exceptions with try-catch for null pointer errors, then use the scanner class to read console input and validate or retry user data with a do-while loop.
Learn to read user input with the scanner, validate the birth year against a 2022 cap and 125-year range, and handle non-numeric input with try-catch and a do-while loop.
Read five valid integers from the console and sum them. Validate input with try-catch for number format exceptions, prompting 'Enter number #x:' and looping until five valid entries are collected.
master the min max challenge by looping to prompt for numeric input, validate as numbers, track the running min and max, and display them when a non numeric entry ends.
Explore the fundamentals of object-oriented programming by learning classes, objects, and constructors, and examine inheritance, encapsulation, polymorphism, and composition.
Learn how object-oriented programming models real-world objects as software with state and behavior, using a car class to illustrate fields, methods, encapsulation, and access modifiers.
Create a car object from the class using the new keyword and access private fields through getters. Learn encapsulation, field defaults, and how getters expose data via a public interface.
Implement setter methods to assign values to private car fields, preserving encapsulation, and validate inputs by using this to set Unknown when null and only Holden, Porsche, or Tesla.
Build and test a bank account class with fields for account number, balance, customer name, email, and phone; include getters, setters, and deposit and withdraw methods that prevent negative balances.
Explore how constructors initialize objects in Java, including no-argument and parameterized constructors in the account class. Learn constructor overloading and how this keyword assigns fields during object creation.
Explore constructor overloading and chaining in Java, using this() to call another constructor from a no-argument constructor, forwarding values to a five-parameter constructor for consistent field initialization.
Create a Customer class with private name, credit limit, and email fields, expose getters, and implement three constructors (all fields, no-args, and name-email) using this() chaining, then test in main.
Explore references, objects, instances, and classes in Java using a house blueprint analogy; learn how references point to objects, and how multiple references share one object.
Compare static and instance variables in Java, noting that static variables are shared across instances and accessed via class name, while instance variables belong to each object and store state.
Compare static and instance methods by using the static modifier, calling static methods via class name or directly, and creating instances with new to access instance methods.
Explore how a plain old java object (pojo) stores data in fields, acts as a JavaBean or DTO, and uses constructors, getters, setters, and toString for data transfers.
Replace boilerplate pojo code with java records, immutable data carriers that auto generate constructors, accessors, and toString, while removing setters.
Learn how inheritance enables code reuse in Java by defining a base Animal class with common fields and methods, and extending it with Dog to inherit and customize behavior.
Explore inheritance in Java by extending the animal class to create a dog with attributes, constructors, and behaviors, using super calls, constructor chaining, and overriding to customize toString and move.
Explore inheritance with animal, dog, and fish classes, showing private and protected members, overridden methods, and how polymorphism enables runtime behavior and code extensibility.
Explore how java.lang.Object is the root of Java class hierarchy, and how every class implicitly extends Object, inheriting and overriding methods like toString and equals to support inheritance and polymorphism.
Master java inheritance by building a worker hierarchy with the extends keyword, from Worker to Employee with salaried and hourly subclasses, implementing constructors, get age, collect pay, terminate, and toString.
Explore building a salaried and an hourly employee in an inheritance chain, overriding toString and collectPay, and adding retirement and double-pay features in Java.
Master the this and super keywords in Java, understand this() and super() constructor calls, and apply constructor chaining to reduce code duplication and properly initialize objects.
Compare method overloading and method overriding in Java, highlighting compile-time vs runtime polymorphism, same name with different parameters versus same name and parameters, and covariant return types.
Explore Java text blocks for multi-line strings and master output formatting with print F and format methods. Learn to use format specifiers like %D and %F, control precision and width, apply platform line separators, and compare string format and formatted methods for readable, maintainable code.
Explore the most used Java string methods, from inspection and indexing (length, isEmpty, isBlank, charAt, indexOf, lastIndexOf) to comparison and manipulation (equals, equalsIgnoreCase, contentEquals, startsWith, endsWith, contains, toLowerCase, regionMatches).
Explore string manipulation methods, from cleanup operations like trim and indent to transformation methods such as join and concat, including substring, index of, and replace variants.
Compare strings and StringBuilder to show strings are immutable while StringBuilder is mutable, offering append, delete, insert, reverse, capacity management, and set length for efficient text manipulation.
Explore composition, encapsulation, and polymorphism to understand their roles in object-oriented programming and how to apply them in your Java projects.
Explore composition in Java by modeling a personal computer as a product with has-a relationships to a monitor, motherboard, and computer case, contrasting it with is-a inheritance.
Explore how composition builds a personal computer by combining the case, monitor, and motherboard, and contrast it with inheritance, emphasizing encapsulation, getters, and flexible design.
Model a smart kitchen by composing IoT appliances and controlling them with set kitchen state and do kitchen work to brew coffee, order food, and wash dishes.
Encapsulation hides internal class details to protect data and simplify public interface, using private fields and controlled access. It warns against public fields in a player class and emphasizes constructors.
Create an encapsulated enhanced player by declaring private fields, implementing constructors with health validation (1–100), and exposing state through methods, preventing direct data access and preserving class integrity.
Practice encapsulation by building a printer class with toner, duplex settings, and pages printed; implement addToner and printPages with proper validation and getters.
Explore polymorphism in Java by creating a Movie base class and subclasses Adventure, Comedy, and Science Fiction. Observe runtime type and behavior via overridden watchMovie methods and dynamic binding.
Master the factory method for polymorphism by returning movie subclass instances from a getMovie method, driven by runtime type and a simple switch, to simplify calling code.
See how polymorphism maps a compile-time movie reference to multiple runtime types, and how casting and var with local variable type inference handle compile-time versus runtime typing in Java.
Compare runtime type with compile time type in Java, determine runtime type using getClass and getSimpleName, and use instanceof or pattern matching to call type-specific watch methods.
Explore polymorphism in Java by building a Car base class and GasPoweredCar, ElectricCar, and HybridCar subclasses, overriding start and run engine to execute different behaviors at runtime.
Master polymorphism by finalizing car inheritance and overriding start engine and run engine methods for gas-powered, electric, and hybrid cars, and test runtime behavior in a single main class.
Apply object-oriented programming to build a complete burger restaurant app using composition, inheritance, encapsulation, and polymorphism. Create meal orders with burgers, drinks, sides, toppings, and the deluxe burger price.
Build a burger class that extends item, supports extra toppings, and accurate pricing. Create a meal order using composition with burger, drink, and side, with itemized pricing.
Extend the base burger to a deluxe version, add two extra toppings, and keep the meal price flat at eight dollars fifty, with toppings free.
Explore how packages organize related types, use import statements or fully qualified names, and manage access across packages, with practical IntelliJ examples.
Discover how arrays serve as the basic container to store multiple values of the same type in Java, a foundational step in the Java Masterclass.
Explore Java arrays as a foundational data structure for storing multiple values of the same type, covering declaration, initialization (including anonymous arrays), access by index, and looping with for.
Learn how to populate and loop through Java arrays, compare for and enhanced for loops, and print arrays using Arrays.toString while exploring object arrays and default values.
Explore the java.util.Arrays helper class to sort, fill, and copy arrays, with practical examples of binary search across primitive and object arrays, and understand how copying preserves originals.
Explore how to search arrays in Java, contrasting linear and binary search. Learn how Arrays.binarySearch on sorted arrays returns a position or -1, and how Arrays.equals checks equality.
Create a program that generates a random integer array, prints the unsorted state, sorts it in descending order with a swap-based reverse sort, and prints the sorted result.
Explore foundational array concepts in Java, including zero-based indexing, creating arrays, default values, and common pitfalls like index out of bounds and loop errors, with practical examples.
Explore how arrays are reference types, where multiple references can point to the same memory, and how Java passes a copy of the reference to a method, mutating the array.
Master varargs in Java by converting between string arrays and variable arguments, and learn how main method signatures adapt for command-line inputs while exploring split and join.
Tackle the minimum element challenge by reading a comma delimited list of integers from the console, parsing them into an array, and finding the minimum with a dedicated findMin method.
Reverse an int array in place by swapping outer elements toward the center, mutating the original, and contrast with a reverse copy that returns a new array.
Explore multi-dimensional arrays in Java, focusing on two-dimensional arrays as matrices, with nested arrays of varying lengths, and learn to declare, initialize, traverse with for loops, and print them.
Explore jagged and multi-dimensional arrays in Java by assigning outer arrays to hold inner arrays of varying sizes, using array initializers and new int[], and printing with Arrays.deepToString.
Explore Java collections beyond arrays by learning lists, including ArrayList and LinkedList, and master concepts like Big O notation, iterators, autoboxing and unboxing, and enums.
Explore how the ArrayList implements the List interface to provide a resizeable collection for grocery items. Use generics and the diamond operator for compile-time type checking.
Learn to declare typed array lists, use the diamond operator, and apply add, set, remove, and addAll, including converting arrays with List.of and understanding mutable versus immutable lists.
Master ArrayList searching, retrieving, and removing with get, contains, indexOf, lastIndexOf, remove, removeAll, and retainAll; sort with naturalOrder or reverseOrder and convert to arrays with toArray.
Compare arrays and ArrayLists side by side to learn their similarities, differences, and key methods. Understand sizing, mutability, and features like Arrays.asList, List.of, and array backing.
Build an interactive grocery list using ArrayList and Scanner with a menu to add, remove, and print a sorted, duplicate-free list after each operation.
Explore memory layout of arrays, arraylists, and linkedlists; understand capacity, reallocation, and Big O implications for add, remove, and traversal.
Explore linked lists in Java by adding and removing elements, leveraging LinkedList as a list, queue, double-ended queue, and stack, with methods like add, addFirst, offer, poll, and push.
Explore LinkedList retrieval and itinerary traversal in Java: use get, getFirst/getLast, indexOf/lastIndexOf, element and peek variants, and iterators like listIterator for various traversal styles.
Master how iterators traverse lists using next and hasNext, and leverage ListIterator for forward and backward movement, add and remove operations, while understanding the cursor between elements.
Build a LinkedList itinerary of Place records ordered by distance from Sydney, prevent duplicates, and navigate forward and backward with a ListIterator.
Create an interactive linked list navigator using ListIterator to move forward and backward through a places to visit itinerary, with a menu-driven interface, input handling, and print menu functionality.
Learn how Java handles primitive types and wrapper classes, including boxing, unboxing, and autoboxing. See why wrappers enable use with collections and generics and why valueOf is preferred over constructors.
Explore autoboxing and unboxing with arrays, varargs, and lists such as ArrayList and LinkedList, using Integer and Character wrappers, Arrays.toString, and List.of.
Build a simple banking app demonstrating autoboxing and unboxing with a customer and bank. Add customers and print statements for each Double transaction.
Build a bank application in Java that uses autoboxing and unboxing to manage customers and transactions, validate new customers, print formatted statements, and test behavior with edge cases.
Explore how to declare and use enums in Java, including predefined constants, ordinal and name methods, and random day selection with the values array.
Master enum usage by switching on DayOfTheWeek, using ordinal and name, formatting day names with string methods, and creating a Topping enum with a custom getPrice method and values() iteration.
Step into the world of programming with our Java Programming Masterclass, meticulously updated for 2024. Since its inception in 2016, this course has evolved continuously, ensuring you receive the latest and most relevant Java education. Purchase once and gain access to a lifetime of updates without any additional cost.
Join an expansive community of over 832,000 students who have chosen my in-depth Java programming course for its thorough and detailed curriculum. Like Benhur G., who appreciates that "all lessons helpful in your Java Programming journey are included," you'll find our course suitable for all levels of expertise.
Whether you're aiming to:
Secure your first Java programming job
Advance to a senior software developer role
Prepare for the Oracle Java certification exam
Develop your own Java applications
Our Java Masterclass is your comprehensive resource for achieving these goals and more.
Why Java?
Its enduring presence in the tech world is unmatched, making it a wise choice for both budding and experienced programmers. Its popularity, as evidenced by Java's top 3 ranking in language use worldwide, promises abundant career opportunities.
Our course is designed to provide a real-world perspective on programming. As Pallala gowtham R. notes, "Tim's emphasis on coding over theory is exceptional," enabling you to build practical coding skills that are rare to find alongside theoretical knowledge.
Bemnet Bekele B. finds the course "very good" and appreciates that "every topic is explained in detail," making it accessible for beginners. Similarly, Suyash praises the "detailed explanation of JAVA language," highlighting the instructor’s dedication to ensuring students grasp each concept through repetition and clarity.
This Masterclass isn’t just about quantity but quality. With over 100 hours of content, the course is structured to facilitate learning at your own pace. Devansh R. finds the course "very helpful," noting that even with intermediate Java knowledge, there were many new things to learn.
The course is curated to give you a solid grounding in Java essentials in just the first 14 hours. Bhuvanendra's experience is a testament to this: "After completing the first 8 sections, I can see myself improved a lot in the way I write code."
With Java 17 as the focal point, you're learning a version with long-term support and current industry relevance. Moreover, as new versions like Java 21 emerge, this course will adapt, providing you with the most contemporary and robust Java education available.
Choose this course for its bestseller status and join a thriving learning community backed by exceptional reviews. My commitment to quality and continuous improvement means you receive an education that’s both current and comprehensive.
You're not just enrolling in a course; you're gaining a partner in your learning journey. With support to address your questions from myself, teaching assistants, and the community, and regular updates to the content, you'll never feel stuck.
Take the leap today with our 30-day, full money-back guarantee. Whether you seek to develop remarkable programs or embark on a transformative career, you have everything to gain.
Enroll now and become part of a legacy of success. Your Java journey begins here.