Learn Java
A free, interactive online Java course. You write Java on every lesson, with AI hints when something doesn't compile, and a free certificate when you finish.
224,055+ codders enrolled
- Beginner friendly
AI-assisted coding help
Hands-on interactive lessons
Audio narration on every lesson
Quizzes to test your knowledge
Free certificate of completion
Syllabus
Section 1
Fundamentals
Start sectionStartExpandCollapseBuild a strong foundation with essential concepts and basic skillsIntroduction
4 lessons324- 01JavaChallenge
- 02Hello World!ChallengeQuiz
- 03CommentsQuiz
- 04Basic Program StructureChallengeQuiz
Variables Part 1
5 lessons940- 01NumbersChallengeMasteryQuiz
- 02StringChallengeMasteryQuiz
- 03BooleanChallengeMasteryQuiz
- 04charChallengeMasteryQuiz
- 05Type DeclarationChallengeQuiz
Variables Part 2
5 lessons333- 01ConstantsChallengeQuiz
- 02Naming ConventionsQuiz
- 03Recap - Initialize VariablesChallenge
- 04Type Casting Part 1ChallengeQuiz
- 05Type Casting Part 2Quiz
Operators Part 1
7 lessons956- 01Arithmetic OperatorsChallengeMasteryQuiz
- 02Modulo OperatorChallengeMasteryQuiz
- 03Increment/DecrementChallengeMasteryQuiz
- 04Post Increment/DecrementMasteryQuiz
- 05Arithmetic ShortcutsChallengeQuiz
- 06Comparison OperatorsChallengeQuiz
- 07String ComparisonQuiz
Operators Part 2
5 lessons834- 01Logical Operators Part 1ChallengeMasteryQuiz
- 02Logical Operators Part 2ChallengeMasteryQuiz
- 03Recap - Simple LogicChallenge
- 04Logical Operators Part 3ChallengeQuiz
- 05Logical Operators Part 4ChallengeMasteryQuiz
Decision Making
6 lessons1038- 01If StatementChallengeMasteryQuiz
- 02If - ElseChallengeMasteryQuiz
- 03Switch StatementChallengeMasteryQuiz
- 04Ternary OperatorChallengeMasteryQuiz
- 05Recap - If ElseChallenge
- 06Nested If - ElseChallengeQuiz
Basic IO
5 lessons723- 01System.out MethodsChallengeMasteryQuiz
- 02Formatting OutputChallengeMasteryQuiz
- 03Scanner ClassChallengeQuiz
- 04Recap - Till 120Challenge
- 05Recap - True or FalseChallenge
Calculator App
Project4 lessons1- 01Welcome MessageChallenge
- 02Getting NumbersProject
- 03Basic OperationsProject
- 04Formatted OutputProject
Loops
9 lessons1362- 01For Loop Part 1ChallengeMasteryQuiz
- 02While LoopChallengeMasteryQuiz
- 03Do While LoopChallengeMasteryQuiz
- 04BreakChallengeMasteryQuiz
- 05ContinueChallengeMasteryQuiz
- 06For Loop Part 2Quiz
- 07Nested LoopChallengeMasteryQuiz
- 08Infinite LoopQuiz
- 09Recap - Dynamic InputChallenge
Methods (Functions)
7 lessons843- 01Declaring MethodsChallengeMasteryQuiz
- 02Method ParametersChallengeQuiz
- 03Return TypesChallengeQuiz
- 04Method OverloadingMasteryQuiz
- 05Recap - Sigma FunctionChallenge
- 06Recap - Validation FunctionChallenge
- 07Void MethodsChallengeQuiz
Arrays Basics
6 lessons929- 01Declaring ArraysChallengeQuiz
- 02Accessing ElementsChallengeQuiz
- 03Modifying ArraysChallengeMasteryQuiz
- 04Array MethodsChallengeMasteryQuiz
- 05Recap - Product ArrayChallengeMastery
- 06Recap - Reversed ArrayChallenge
Iterating Over Arrays
3 lessons423- 01Using For LoopChallengeQuiz
- 02Enhanced For LoopChallengeQuiz
- 03Common Array OperationsChallengeMasteryQuiz
String Operations
4 lessons832- 01String Methods Part 1ChallengeMasteryQuiz
- 02String Methods Part 2ChallengeMasteryQuiz
- 03String FormattingChallengeMasteryQuiz
- 04String ComparisonChallengeMasteryQuiz
Final Challenges
3 lessons38- 01Number PatternChallengeQuiz
- 02Pattern FinderChallenge
- 03Student Grade CalculatorChallenge
Section 2
Logic & Flow
Start sectionStartExpandCollapseMaster advanced Java programming with a focus on data structures and flow control. Learn to work with complex arrays, collections, error handling, and time management.Multi-dimensional Arrays
9 lessons1457- 012D Arrays BasicsChallengeQuiz
- 02Accessing 2D Array ElementsChallengeQuiz
- 03Nested Loops with 2D ArraysChallengeMasteryQuiz
- 04Recap - 2D ArraysChallenge
- 05Matrix Addition & SubstractionChallengeMasteryQuiz
- 06Jagged ArraysChallengeMasteryQuiz
- 073D Arrays And BeyondChallengeMasteryQuiz
- 08Common 2D Array PatternsChallengeMasteryQuiz
- 09Recap - All About ArraysChallenge
HashMap Part 1
6 lessons637- 01What is a HashMap?Quiz
- 02Declare a HashMapChallengeQuiz
- 03Accessing ValuesChallengeQuiz
- 04Check If Key ExistsChallengeMasteryQuiz
- 05Modifying DictionariesChallengeQuiz
- 06Recap - HashMapChallenge
HashMap Part 2
6 lessons1030- 01HashMap MethodsChallengeMasteryQuiz
- 02Iterate with keySet()ChallengeMasteryQuiz
- 03Iterate with entrySet()ChallengeMasteryQuiz
- 04Nested HashMapChallengeMasteryQuiz
- 05Recap - Manage WarehouseChallenge
- 06Recap - HashMap OperationsChallenge
HashSet Part 1
7 lessons844- 01What is a HashSet?Quiz
- 02Adding an ElementChallengeQuiz
- 03Removing an ElementChallengeQuiz
- 04Checking if an Element ExistsChallengeMasteryQuiz
- 05Empty and SizeChallengeMasteryQuiz
- 06Clear and CloneChallengeQuiz
- 07Recap - HashSetChallenge
HashSet Part 2
6 lessons1146- 01Math - Union of HashSetsChallengeMasteryQuiz
- 02Math - Intersection of HashSetChallengeMasteryQuiz
- 03Math - Set DifferenceChallengeMasteryQuiz
- 04Math - Symmetric DifferenceChallengeQuiz
- 05Subsets and SupersetsChallengeMasteryQuiz
- 06Iterating Over SetsChallengeMasteryQuiz
Advanced Control Flow
5 lessons929- 01Label StatementsChallengeMasteryQuiz
- 02Switch ExpressionChallengeMasteryQuiz
- 03Pattern MatchingChallengeMasteryQuiz
- 04Guard ClausesChallengeMasteryQuiz
- 05Recap - Control FlowChallenge
Basic Error Handling
4 lessons630- 01Try-Catch BasicsChallengeMasteryQuiz
- 02Finally BlockChallengeQuiz
- 03Throwing ExceptionsChallengeMasteryQuiz
- 04Custom ExceptionsChallengeQuiz
Advanced String Operations
6 lessons1145- 01StringBuilder BasicsChallengeMasteryQuiz
- 02StringBuffer IntroductionChallengeMasteryQuiz
- 03Regular Expressions BasicsChallengeMasteryQuiz
- 04Pattern Matching with RegexChallengeMasteryQuiz
- 05String TokenizerChallengeMasteryQuiz
- 06Advanced String FormattingChallengeQuiz
Project - Unique Word Counter
Project4 lessons123- 01Text Input and StorageChallenge
- 02Word ProcessingProjectQuiz
- 03Word CountingProjectQuiz
- 04Advanced StatisticsProjectQuiz
Date and Time
6 lessons646- 01LocalDate BasicsChallengeQuiz
- 02LocalTime OperationsChallengeQuiz
- 03LocalDateTime UsageChallengeQuiz
- 04Period and DurationChallengeQuiz
- 05Date FormattingChallengeQuiz
- 06Time Zone HandlingChallengeQuiz
Section 3
Object Oriented Programming
Start sectionStartExpandCollapseDiscover how to organize code with classes, objects, and reusable structuresFundamentals of OOP
9 lessons971- 01External FilesChallengeQuiz
- 02Introduction to OOPChallengeQuiz
- 03Classes vs ObjectsChallengeQuiz
- 04The this KeywordChallengeQuiz
- 05MethodsChallengeQuiz
- 06Fields (Attributes)ChallengeQuiz
- 07Constructor MethodChallengeQuiz
- 08Constructor OverloadingChallengeQuiz
- 09Recap - Simple CalculatorChallenge
Access Modifiers & Encapsulate
5 lessons536- 01Access Levels OverviewChallengeQuiz
- 02Getter and Setter MethodsChallengeQuiz
- 03Information HidingChallengeQuiz
- 04The final KeywordChallengeQuiz
- 05Recap - Bank Account ManagerChallenge
Class Props & Static Member
5 lessons533- 01Instance vs Static VariablesChallengeQuiz
- 02Static MethodsChallengeQuiz
- 03Static BlocksChallengeQuiz
- 04Constants (static final)ChallengeQuiz
- 05Recap - Counter & UtilityChallenge
Inheritance
8 lessons862- 01Basic Inheritance (extends)ChallengeQuiz
- 02The super KeywordChallengeQuiz
- 03Method Overriding (@Override)ChallengeQuiz
- 04Constructor ChainingChallengeQuiz
- 05The Object ClassChallengeQuiz
- 06Single & Multilevel InheritChallengeQuiz
- 07Why No Multi Class InheritChallengeQuiz
- 08Recap - Employee HierarchyChallenge
Polymorphism
6 lessons645- 01Method Overloading BasicsChallengeQuiz
- 02Method Overriding (Run-Time)ChallengeQuiz
- 03Upcasting and DowncastingChallengeQuiz
- 04The instanceof OperatorChallengeQuiz
- 05Abstract Classes and MethodsChallengeQuiz
- 06Recap - Shape CalculatorChallenge
Interfaces & Abstract Classes
7 lessons754- 01Introduction to InterfacesChallengeQuiz
- 02Implementing InterfacesChallengeQuiz
- 03Multi Interface ImplemenChallengeQuiz
- 04Default & Static in InterfaceChallengeQuiz
- 05Abstract Classes vs InterfacesChallengeQuiz
- 06Functional InterfacesChallengeQuiz
- 07Recap - Payment SystemChallenge
Special Methods & Object Class
6 lessons644- 01toString() MethodChallengeQuiz
- 02equals() and hashCode()ChallengeQuiz
- 03clone() MethodChallengeQuiz
- 04compareTo() and ComparableChallengeQuiz
- 05Comparator InterfaceChallengeQuiz
- 06Recap - Custom SortingChallenge
Advanced OOP Concepts
6 lessons653- 01Composition vs InheritanceChallengeQuiz
- 02Aggregation vs CompositionChallengeQuiz
- 03Inner Nested & Anonymous ClassChallengeQuiz
- 04Enums and Enum MethodsChallengeQuiz
- 05Records (Java 16+)ChallengeQuiz
- 06Sealed Classes (Java 17+)ChallengeQuiz
Generics
6 lessons644- 01Introduction to GenericsChallengeQuiz
- 02Generic ClassesChallengeQuiz
- 03Generic MethodsChallengeQuiz
- 04Bounded Type ParametersChallengeQuiz
- 05Wildcards (?, extends, super)ChallengeQuiz
- 06Recap - Generic ContainerChallenge
Exception Handling in OOP
5 lessons536- 01Exception Class HierarchyChallengeQuiz
- 02Custom ExceptionsChallengeQuiz
- 03Checked vs Unchecked ErrorsChallengeQuiz
- 04Try With Resources PatternChallengeQuiz
- 05Recap - Validated UserChallenge
Design Patterns Part 1
6 lessons654- 01Intro to Design PatternsChallengeQuiz
- 02Singleton PatternChallengeQuiz
- 03Factory PatternChallengeQuiz
- 04Builder PatternChallengeQuiz
- 05Observer PatternChallengeQuiz
- 06Strategy PatternChallengeQuiz
Design Patterns Part 2
7 lessons763- 01Command PatternChallengeQuiz
- 02Adapter PatternChallengeQuiz
- 03Decorator PatternChallengeQuiz
- 04Template Method PatternChallengeQuiz
- 05State PatternChallengeQuiz
- 06Composite PatternChallengeQuiz
- 07Iterator PatternChallengeQuiz
Project: Library Management
Project7 lessons1- 01Project Overview & UML DesignChallenge
- 02Book and User ClassesProject
- 03Borrowing SystemProject
- 04Search FunctionalityProject
- 05Admin InterfaceProject
- 06Exception Handling IntegrationProject
- 07Testing and IntegrationProject
Final Challenges
4 lessons437- 01E-Learning PlatformChallengeQuiz
- 02Banking SystemChallengeQuiz
- 03Game Character DevelopmentChallengeQuiz
- 04Vehicle Rental ServiceChallengeQuiz
Java courses
Hands-on Java courses, free to start in your browser.
Beginner Challenges - Practice Basic Concepts
PopularPut your beginner coding knowledge to test and try to solve this programming challenges, use any language you want, Happy Coding!
Certificate on completion
- 20
- 20
Coding Problems
PopularPut your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language.
Certificate on completion
- 32
- 31
Stack - Data Structures Series #1
In this course, you will learn about the Stack data structure, create a Stack from zero using your preferred language, and practice coding challenges with it!
- 13
- 6
- 1
Coding Problems: Volume 2
Put your programming problem solving skills to the test using the exercises with different difficulties in this course. Designed for coders with some prior knowledge of the basic syntax in any programming language. This course is an extension of the first Coding Problems
Certificate on completion
- 25
- 24
Heaps & Priority Queues - Data Structures Series #7
NewIn this course, you will learn about the Heap data structure (the backbone of priority queues), create a MinHeap from zero using your preferred language, and practice coding challenges with it!
Certificate on completion
- 14
- 6
- 1
Binary Tree - Data Structures Series #3
In this course, you will learn about the Binary Tree data structure, create a Binary Tree from zero using your preferred language, and practice coding challenges with it!
- 13
- 5
- 1
Why learn Java with Coddy
- Write and run real Java code in your browser. No JDK install, no IDE setup. The editor compiles and runs your Java program server-side and shows the output instantly.
- Object-oriented Java the way it's used in the real world: classes, inheritance, interfaces, polymorphism, generics, exception handling. Every concept gets a hands-on exercise.
- AI hints help you read and fix Java errors, especially the verbose stack traces, so the language feels less intimidating from day one.
- Free Java certificate when you finish the course. A credible signal for backend, Android, or enterprise roles where Java fluency matters.