PopularJourney
Learn Java
Learn Java online with a free, interactive course. Work through Java syntax, classes and objects, inheritance, and collections with hands-on coding exercises and AI hints — and earn a free certificate when you finish.
208,497+ 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
3 sections3 projects219 lessons197 challenges1,464 quiz questions01Section 1
Fundamentals
Build a strong foundation with essential concepts and basic skillsSTART LEARNINGIntroduction
4 lessons324- 01JavaChallenge
- 02Hello World!ChallengeQuizAudio
- 03CommentsQuizAudio
- 04Basic Program StructureChallengeQuizAudio
Variables Part 1
5 lessons940- 01NumbersChallengeMasteryQuizAudio
- 02StringChallengeMasteryQuizAudio
- 03BooleanChallengeMasteryQuizAudio
- 04charChallengeMasteryQuizAudio
- 05Type DeclarationChallengeQuizAudio
Variables Part 2
5 lessons333- 01ConstantsChallengeQuizAudio
- 02Naming ConventionsQuizAudio
- 03Recap - Initialize VariablesChallenge
- 04Type Casting Part 1ChallengeQuizAudio
- 05Type Casting Part 2QuizAudio
Operators Part 1
7 lessons956- 01Arithmetic OperatorsChallengeMasteryQuizAudio
- 02Modulo OperatorChallengeMasteryQuizAudio
- 03Increment/DecrementChallengeMasteryQuizAudio
- 04Post Increment/DecrementMasteryQuizAudio
- 05Arithmetic ShortcutsChallengeQuizAudio
- 06Comparison OperatorsChallengeQuizAudio
- 07String ComparisonQuizAudio
Operators Part 2
5 lessons834- 01Logical Operators Part 1ChallengeMasteryQuizAudio
- 02Logical Operators Part 2ChallengeMasteryQuizAudio
- 03Recap - Simple LogicChallenge
- 04Logical Operators Part 3ChallengeQuizAudio
- 05Logical Operators Part 4ChallengeMasteryQuizAudio
Decision Making
6 lessons1038- 01If StatementChallengeMasteryQuizAudio
- 02If - ElseChallengeMasteryQuizAudio
- 03Switch StatementChallengeMasteryQuizAudio
- 04Ternary OperatorChallengeMasteryQuizAudio
- 05Recap - If ElseChallenge
- 06Nested If - ElseChallengeQuizAudio
Basic IO
5 lessons723- 01System.out MethodsChallengeMasteryQuizAudio
- 02Formatting OutputChallengeMasteryQuizAudio
- 03Scanner ClassChallengeQuizAudio
- 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 1ChallengeMasteryQuizAudio
- 02While LoopChallengeMasteryQuizAudio
- 03Do While LoopChallengeMasteryQuizAudio
- 04BreakChallengeMasteryQuizAudio
- 05ContinueChallengeMasteryQuizAudio
- 06For Loop Part 2QuizAudio
- 07Nested LoopChallengeMasteryQuizAudio
- 08Infinite LoopQuizAudio
- 09Recap - Dynamic InputChallenge
Methods (Functions)
7 lessons843- 01Declaring MethodsChallengeMasteryQuizAudio
- 02Method ParametersChallengeQuizAudio
- 03Return TypesChallengeQuizAudio
- 04Method OverloadingMasteryQuizAudio
- 05Recap - Sigma FunctionChallenge
- 06Recap - Validation FunctionChallenge
- 07Void MethodsChallengeQuizAudio
Arrays Basics
6 lessons929- 01Declaring ArraysChallengeQuizAudio
- 02Accessing ElementsChallengeQuizAudio
- 03Modifying ArraysChallengeMasteryQuizAudio
- 04Array MethodsChallengeMasteryQuizAudio
- 05Recap - Product ArrayChallengeMastery
- 06Recap - Reversed ArrayChallenge
Iterating Over Arrays
3 lessons423- 01Using For LoopChallengeQuizAudio
- 02Enhanced For LoopChallengeQuizAudio
- 03Common Array OperationsChallengeMasteryQuizAudio
String Operations
4 lessons832- 01String Methods Part 1ChallengeMasteryQuizAudio
- 02String Methods Part 2ChallengeMasteryQuizAudio
- 03String FormattingChallengeMasteryQuizAudio
- 04String ComparisonChallengeMasteryQuizAudio
Final Challenges
3 lessons38- 01Number PatternChallengeQuizAudio
- 02Pattern FinderChallenge
- 03Student Grade CalculatorChallenge
02Section 2
Logic & Flow
Master advanced Java programming with a focus on data structures and flow control. Learn to work with complex arrays, collections, error handling, and time management.START LEARNINGMulti-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
03Section 3
Object Oriented Programming
Discover how to organize code with classes, objects, and reusable structuresSTART LEARNINGFundamentals 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
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 — with hands-on exercises after every concept.
- AI-assisted hints help you read and fix Java errors (the verbose stack traces especially) 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.
Frequently asked questions about learning Java
Is Java hard to learn?
Java is more verbose than scripting languages like Python or JavaScript — every program needs a class, methods are declared with explicit types, and you compile before you run. The upside is that the strictness teaches good habits early. Coddy's Java course explains why each piece exists, which makes the verbosity feel less arbitrary.
How long does it take to learn Java?
Java basics — syntax, methods, classes, objects — take two to four weeks of daily practice. Comfortable use of inheritance, interfaces, and the standard collections takes one to three months. Going deeper into Spring, Android, or backend work is a separate ramp on top of that.
Should I learn Java or Python first?
Pick based on goal, not difficulty. Python is shorter to write and great for data, scripting, and AI. Java is the standard for Android, enterprise backends, and large team codebases — and the strict typing teaches OOP fundamentals that transfer everywhere. If you're starting from zero with no specific target, Python is faster to feel productive in.
Can I learn Java for free online?
Yes. Coddy's interactive Java course is free — lessons, coding exercises, quizzes, and a certificate of completion. The editor runs in the browser so you don't need to install the JDK locally to start coding Java.
Do I need to install Java to use this course?
No. Every Java exercise compiles and runs server-side in a sandboxed environment, and the output shows up next to your code. No JDK, no IDE, no project setup — just open the lesson and start coding.
Do I get a Java certificate at the end?
Yes — when you complete Coddy's Java course you receive a free certificate of completion. It's not a university accreditation, but it's a verifiable signal that you've worked through a structured, interactive Java course with real coding exercises.