Java practice · complete catalogue
235 exercises. No filler.
Every task belongs to a lesson and names the exact skill it checks. Follow the course in order, or jump straight to the topic you need to test.
132 checked tasks96 coding investigations7 quizzes97 estimated hours
Where the work happens
Code in VS Code. Answer quizzes in the lesson.
The extension opens starter files, requirements, hints, and checks beside your editor. The current preview does not submit work or sync progress; account-based sync is planned for a later release.
Open in VS Code Marketplace1.1Why Java ExistsPhase I
ex-1-1-aTrace the JourneyQuizWarm up5 min10 ptsex-1-1-bIdentify a PlatformQuizWarm up5 min10 ptsex-1-1-cDecide What Can RunQuizPractice8 min20 ptsex-1-1-dEvaluate the Java TradeoffQuizPractice8 min20 pts
1.2JVM, JRE, JDK, and Your First ProgramPhase I
ex-1-2-aVerify a JDK InstallationQuizWarm up5 min10 ptsex-1-2-bYour First Program, the Slow WayCodeWarm up15 min10 ptsex-1-2-cRead Bytecode OutputQuizPractice8 min20 ptsex-1-2-dIdentify the Failing ToolQuizPractice8 min20 pts
2.1Variables, Types, Literals, KeywordsPhase II
ex-2-1-aAll Eight, PrintedCodeWarm up15 min10 ptsex-2-1-bWatch an int OverflowCodePractice20 min20 ptsex-2-1-cSix Broken DeclarationsCodePractice20 min20 ptsex-2-1-dThe Registry BeginsCodePractice25 min25 ptsRegistryex-2-1-eWork Out the Ranges YourselfCodeChallenge30 min30 pts
2.2How Numbers Live in MemoryPhase II
ex-2-2-aTwo's Complement By HandCodeWarm up20 min15 ptsex-2-2-bInspect Exact Float ValuesCodePractice20 min20 ptsex-2-2-cTake a Float ApartCodeChallenge35 min30 ptsex-2-2-dThe Money BugCodePractice25 min25 ptsRegistry
2.3Type Conversion, Promotion, CastingPhase II
ex-2-3-aPredict Then RunCodeWarm up20 min15 ptsex-2-3-bTrace Narrowing at the Bit LevelCodePractice25 min20 ptsex-2-3-cConvert Before DivisionCodePractice20 min20 ptsex-2-3-dWidening Can RoundCodeChallenge30 min30 pts
3.1OperatorsPhase III
ex-3-1-aRemainder with Negative OperandsCodeWarm up15 min15 ptsex-3-1-bThe Hidden CastCodePractice20 min20 ptsex-3-1-cProve the Short CircuitCodePractice20 min20 ptsex-3-1-dTwo Right ShiftsCodePractice25 min25 ptsex-3-1-eRegistry Flags in One intCodeChallenge35 min30 ptsRegistry
3.2ConditionalsPhase III
ex-3-2-aRead a Choice and BranchCodeWarm up20 min15 ptsex-3-2-bFind and Fix switch FallthroughCodePractice20 min20 ptsex-3-2-cComparing Decimals SafelyCodeChallenge20 min20 ptsex-3-2-dRegistry Status RulesCodeChallenge35 min30 ptsRegistry
3.3Loops and Jump StatementsPhase III
ex-3-3-aSame Job, Three LoopsCodeWarm up20 min15 ptsex-3-3-bFour Loops That Never StopCodePractice25 min20 ptsex-3-3-cEscaping Two Loops at OnceCodePractice25 min25 ptsex-3-3-dRegistry Roll CallCodeChallenge35 min30 ptsRegistry
4.1ArraysPhase IV
ex-4-1-aFill It, Walk It, Total ItCodeWarm up20 min15 ptsex-4-1-bOne Array, Two NamesCodePractice20 min20 ptsex-4-1-cReverse It In PlaceCodePractice25 min25 ptsex-4-1-dA Grid With Uneven RowsCodePractice25 min25 ptsex-4-1-eThe Registry Gets a RosterCodeChallenge35 min30 ptsRegistry
4.2How Arrays WorkPhase IV
ex-4-2-aModel an Array OffsetCodeWarm up25 min20 ptsex-4-2-bTest a Locality HypothesisCodeChallenge35 min30 ptsex-4-2-cBuild a Growable Array ModelCodeChallenge40 min35 ptsRegistry
5.1Methods, Calls, Recursion, and OverloadingPhase V
ex-5-1-aExtract Three Loops Into One MethodCodeWarm up20 min15 ptsex-5-1-bDraw the StackCodePractice25 min20 ptsex-5-1-cRecursion, and Where It Runs OutCodePractice30 min25 ptsex-5-1-dWhich Overload WinsCodeChallenge30 min30 ptsex-5-1-eThe Registry Grows MethodsCodePractice30 min25 ptsRegistry
6.1Classes, Objects, and `new`Phase VI
ex-6-1-aFrom Parallel Arrays to ObjectsCodePractice30 min25 ptsRegistryex-6-1-bDraw What new DoesCodeWarm up20 min15 ptsex-6-1-cMove the Methods InCodePractice25 min20 ptsex-6-1-dMeasure the OverheadCodeChallenge30 min30 pts
6.2Constructors, Chaining, `this`Phase VI
ex-6-2-aLose the Default ConstructorCodeWarm up15 min15 ptsex-6-2-bThe Assignment That Does NothingCodePractice20 min20 ptsex-6-2-cChain Them ProperlyCodePractice30 min25 ptsRegistry
6.3Objects in Memory: Size, Copying, PassingPhase VI
ex-6-3-aProve Java Is Call By ValueCodeWarm up25 min25 ptsex-6-3-bShallow, Then DeepCodePractice30 min25 ptsex-6-3-cCount Bytes Under One Layout ModelCodeChallenge30 min30 ptsex-6-3-dClose Both Reference LeaksCodeChallenge30 min30 ptsRegistry
6.4`static` and `final`Phase VI
ex-6-4-aOne Copy or ManyCodeWarm up20 min15 ptsex-6-4-bRead Your Own Command LineCodeWarm up20 min15 ptsex-6-4-cFinal Does Not Mean FrozenCodePractice25 min25 ptsex-6-4-dA Registry That Counts ItselfCodePractice30 min25 ptsRegistryex-6-2-dTrace Static and Instance InitializationCodeChallenge25 min25 pts
7.1Encapsulation, Inheritance, Packages, and `super`Phase VII
ex-7-1-aClose the Fields, Keep the RulesCodeWarm up25 min20 ptsex-7-1-bFollow the Constructor ChainCodePractice25 min25 ptsex-7-1-cIs-A or Has-ACodePractice25 min25 ptsex-7-1-dThe Registry Gets a FamilyCodeChallenge40 min35 ptsRegistry
7.2Abstraction, Polymorphism, Abstract Classes, and InterfacesPhase VII
ex-7-2-aDelete Every instanceofCodePractice30 min25 ptsex-7-2-bSee the Two invokesCodeChallenge30 min30 ptsex-7-2-cAbstract Class or InterfaceCodeWarm up30 min25 ptsex-7-2-dThe Override That Was NotCodePractice20 min20 pts
7.3Wrapper Types, Autoboxing, and POJOsPhase VII
ex-7-3-aCompare Boxed Integers at 127 and 128CodeWarm up20 min15 ptsex-7-3-bremove(1) Does Not Do What You ThinkCodePractice20 min20 ptsex-7-3-cMeasure the Boxing TaxCodePractice25 min25 ptsex-7-3-dThe NullPointerException With No DotCodePractice25 min25 ptsRegistry
7.4Static Nested, Inner, Local, and Anonymous ClassesPhase VII
ex-7-4-aStatic Nested or InnerCodeWarm up25 min20 ptsex-7-4-bThe Leak That Looks TinyCodeChallenge30 min30 ptsex-7-4-cAnonymous Class, Then LambdaCodePractice30 min25 ptsex-7-4-dWhy Effectively FinalCodeChallenge25 min25 pts
8.1Java I/O: Streams, Scanner, BufferedReaderPhase VIII
ex-8-1-aUnwrap the Field KitCodeWarm up20 min15 ptsex-8-1-bMeasure the System CallsCodeChallenge30 min30 ptsex-8-1-cThe Scanner Skips a QuestionCodePractice20 min20 ptsex-8-1-dLoad the Registry From a FileCodePractice35 min30 ptsRegistry
8.2Immutable ClassesPhase VIII
ex-8-2-aBreak It, Then Seal ItCodeWarm up30 min25 ptsex-8-2-bChange Means a New ObjectCodePractice25 min25 ptsex-8-2-cThe Record Is Only Shallowly ImmutableCodeChallenge30 min30 ptsex-8-2-dAn Immutable RegistryCodeChallenge40 min35 ptsRegistry
8.3The Object Class: `equals`, `hashCode`, `toString`Phase VIII
ex-8-3-aThree Things That Should WorkCodeWarm up20 min15 ptsex-8-3-bWrite the Pair CorrectlyCodePractice30 min25 ptsex-8-3-cCompare equals and hashCode ImplementationsCodePractice30 min30 ptsex-8-3-dReproduce a Mutable-Key Lookup FailureCodeChallenge30 min35 ptsex-8-3-eRegistry IdentityCodePractice35 min30 ptsRegistry
8.4EnumsPhase VIII
ex-8-4-aLet the Compiler Find the Missing CaseCodeWarm up20 min15 ptsex-8-4-bEnums Carry DataCodePractice30 min25 ptsRegistryex-8-4-cNever Store ordinal()CodePractice25 min25 ptsex-8-4-dBehaviour Per ConstantCodeChallenge30 min30 pts
8.5Interface Methods and Functional InterfacesPhase VIII
ex-8-5-aAdd a Method Without Breaking AnyoneCodeWarm up25 min20 ptsex-8-5-bThe Diamond, ReopenedCodePractice25 min25 ptsex-8-5-cFour Ways, Same ObjectCodePractice30 min30 ptsex-8-5-dA Registry Built on InterfacesCodeChallenge40 min35 ptsRegistry
9.1Strings: The Pool and ImmutabilityPhase IX
ex-9-1-aFind the Pool BoundaryCodeWarm up20 min15 ptsex-9-1-bMethods That Change NothingCodeWarm up15 min15 ptsex-9-1-cThe Input That Breaks ==CodePractice20 min20 ptsex-9-1-dBuild Your Own Immutable TextCodeChallenge35 min30 ptsRegistry
9.2String Methods and StringBuilderPhase IX
ex-9-2-aMeasure the 71xCodePractice25 min20 ptsex-9-2-bisEmpty, isBlank, and Real InputCodeWarm up20 min15 ptsex-9-2-cSplit Has a Sharp EdgeCodePractice25 min25 ptsex-9-2-dRegistry Report BuilderCodePractice30 min25 ptsRegistry
9.3GenericsPhase IX
ex-9-3-aWatch the Cast FailCodeWarm up20 min15 ptsex-9-3-bA Pair That Holds Two TypesCodePractice25 min25 ptsex-9-3-cBound It So You Can Use ItCodePractice25 min25 ptsex-9-3-dProve Erasure YourselfCodeChallenge30 min30 pts
9.4Wildcards: `extends` and `super`Phase IX
ex-9-4-aBreak It If Java Let YouCodeWarm up20 min20 ptsex-9-4-bRead With extendsCodePractice25 min25 ptsex-9-4-cWrite With superCodePractice25 min25 ptsex-9-4-dPick the Right SignatureCodeChallenge30 min30 ptsRegistry
10.1The Collections FrameworkPhase X
ex-10-1-aProve the Trade Is UnavoidableCodePractice25 min20 ptsex-10-1-bSwap the ImplementationCodeWarm up20 min15 ptsex-10-1-cMap Is Not a CollectionCodePractice20 min20 ptsex-10-1-dRegistry, Rebuilt on CollectionsCodePractice35 min30 ptsRegistry
10.2Iterable and the IteratorPhase X
ex-10-2-aMeasure the 806 MillisecondsCodePractice25 min20 ptsex-10-2-bThe Exception That Sometimes Does Not FireCodePractice25 min25 ptsex-10-2-cMake Your Own Class Work With For-EachCodePractice30 min25 ptsRegistryex-10-2-dWalk Everything With One MethodCodeWarm up20 min20 pts
10.3The Collection InterfacePhase X
ex-10-3-aChoose Between List.remove OverloadsCodePractice20 min20 ptsex-10-3-bThe Bulk Methods Replace LoopsCodeWarm up20 min15 ptsex-10-3-dMethods That Exist and ThrowCodePractice20 min20 pts
10.4List: ArrayList, LinkedList, Vector, StackPhase X
ex-10-4-aTest the FolkloreCodeWarm up30 min25 ptsex-10-4-bBreak a Stack From the BottomCodePractice25 min25 ptsex-10-4-csubList Is a WindowCodePractice20 min20 ptsex-10-4-dChoose For a Real WorkloadCodeChallenge30 min30 ptsRegistry
10.5Set and Map: Inside HashMapPhase X
ex-10-5-aBuild a Hash Set From ScratchCodeChallenge40 min35 ptsex-10-5-bMeasure a Bad hashCodeCodePractice25 min25 ptsex-10-5-cWatch the Spreading WorkCodePractice25 min20 ptsex-10-5-dPrevent Mutable Keys in the Registry MapCodeChallenge30 min30 ptsRegistryex-10-5-eHashSet, LinkedHashSet, TreeSetCodePractice25 min20 ptsex-10-3-cUse the Boolean Result of addCodeWarm up20 min15 pts
10.6Map Operations and Specialized MapsPhase X
ex-10-6-aOne Line Instead of FiveCodeWarm up20 min15 ptsex-10-6-bWhat EnumMap Actually Buys YouCodePractice25 min20 ptsex-10-6-cWhen == Is the Right AnswerCodePractice25 min25 ptsex-10-6-dTreeMap Answers Questions HashMap CannotCodePractice25 min25 ptsRegistry
10.7Queue, Deque, and PriorityQueuePhase X
ex-10-7-aFour Names, Two OperationsCodeWarm up20 min15 ptsex-10-7-bA PriorityQueue Is Not SortedCodePractice25 min25 ptsex-10-7-cThe Heap Lives in an ArrayCodeChallenge35 min30 pts
10.8Comparable, Comparator, and SortingPhase X
ex-10-8-aFour Things That Refuse to WorkCodeWarm up20 min15 ptsex-10-8-bThe Subtraction That OverflowsCodePractice20 min20 ptsex-10-8-cBuild Comparators Without Writing OneCodePractice25 min25 ptsex-10-8-dWhen compareTo Disagrees With equalsCodeChallenge30 min30 ptsex-10-8-eRegistry Reports, Sorted Every WayCodePractice30 min25 ptsRegistryex-10-7-dOrder Registry Requests with a ComparatorCodePractice30 min25 ptsRegistry
11.1Lambdas and Functional InterfacesPhase XI
ex-11-1-aThree Orders, One ClassCodeWarm up20 min15 ptsex-11-1-bCount the Class FilesCodePractice20 min20 ptsex-11-1-cMake Something a Lambda Cannot BeCodePractice25 min25 ptsex-11-1-dThe Variable That Will Not Sit StillCodeChallenge25 min25 pts
11.2Method References and the Four ShapesPhase XI
ex-11-2-aName the ShapeCodeWarm up20 min15 ptsex-11-2-bChoose the Correct Method-Reference FormCodePractice25 min25 ptsex-11-2-cTwo Names, Two AnswersCodePractice20 min20 ptsex-11-2-dMeasure the BoxingCodeChallenge30 min30 pts
11.3Streams, and When the Work HappensPhase XI
ex-11-3-aProve Nothing RanCodeWarm up15 min15 ptsex-11-3-bCount What the Filter SeesCodePractice20 min20 ptsex-11-3-cThe Same Job, Both WaysCodePractice25 min25 ptsex-11-3-dUse It TwiceCodePractice20 min20 pts
11.4Stream Operations and CollectorsPhase XI
ex-11-4-aSort Them YourselfCodeWarm up20 min15 ptsex-11-4-bThe Duplicates That Would Not GoCodePractice25 min25 ptsex-11-4-cOne Line Instead of FifteenCodePractice30 min30 ptsex-11-4-dMeasure limit Before and After FilteringCodeChallenge25 min30 pts
11.5OptionalPhase XI
ex-11-5-aWatch the Fallback RunCodeWarm up20 min20 ptsex-11-5-bFlatten the Four IfsCodePractice25 min25 ptsex-11-5-cIdentify Incorrect Optional UsesCodePractice25 min25 ptsex-11-5-dOptionals Into StreamsCodeChallenge25 min25 pts
11.6Parallel and Primitive StreamsPhase XI
ex-11-6-aFind Where Parallel Starts WinningCodePractice30 min25 ptsex-11-6-bDemonstrate Unsafe Parallel MutationCodeChallenge25 min30 ptsex-11-6-cBoxing, One More TimeCodeWarm up25 min25 ptsex-11-6-dSources That Refuse to SplitCodeChallenge25 min30 pts
12.1Exceptions, Errors, and the Stack TracePhase XII
ex-12-1-aRead the Trace BackwardsCodeWarm up20 min15 ptsex-12-1-bThe Return That Ate an ExceptionCodePractice25 min25 ptsex-12-1-cClose Them in the Right OrderCodePractice25 min25 ptsex-12-1-dDistinguish Error from ExceptionCodeChallenge25 min25 pts
12.2Checked, Unchecked, and Exceptions of Your OwnPhase XII
ex-12-2-aFind the Dividing LineCodeWarm up20 min15 ptsex-12-2-bLose the Cause, Lose the TraceCodePractice25 min25 ptsex-12-2-cAn Exception Worth CatchingCodePractice30 min30 ptsex-12-2-dChecked Exceptions Meet LambdasCodeChallenge30 min30 pts
13.1JVM Memory AreasPhase XIII
ex-13-1-aMeasure the Boxing, In MegabytesCodePractice25 min25 ptsex-13-1-bTwo Ways to Run OutCodePractice20 min20 ptsex-13-1-cIdentify Shared Runtime DataCodeWarm up25 min25 ptsex-13-1-dA Thread Costs a MegabyteCodeChallenge25 min30 ptsex-1-2-eCompare Tiered Execution With Interpreter-Only ModeCodeChallenge30 min30 pts
13.2Reachability and Garbage CollectionPhase XIII
ex-13-2-aCollect a RingCodeWarm up25 min25 ptsex-13-2-bWeak, Soft, and NeitherCodePractice25 min25 ptsex-13-2-cLeak On PurposeCodeChallenge30 min30 ptsex-13-2-dWatch It CollectCodeChallenge30 min30 pts
14.1Processes and ThreadsPhase XIV
ex-14-1-aCount the Threads You Did Not StartCodeWarm up15 min15 ptsex-14-1-brun() Is Not start()CodeWarm up20 min20 ptsex-14-1-cTwo Stacks, One HeapCodePractice25 min25 ptsex-14-1-dWaiting Is Not WorkingCodePractice25 min25 pts
14.2Creating Threads and Thread StatesPhase XIV
ex-14-2-aSpend Your Only SuperclassCodeWarm up20 min15 ptsex-14-2-bCatch a Thread in Every StateCodePractice30 min30 ptsex-14-2-cHandle an Uncaught Worker ExceptionCodePractice25 min25 ptsex-14-2-dJoin, or Read NothingCodePractice25 min25 pts
14.3Interruption and Cooperative CancellationPhase XIV
ex-14-3-aThe Loop That Never NoticesCodePractice20 min20 ptsex-14-3-bThe Empty Catch That Erased a RequestCodePractice25 min25 ptsex-14-3-cThe Shutdown That Actually WorksCodeChallenge30 min30 ptsex-14-3-dTwo Methods, One Letter ApartCodeWarm up20 min20 pts
14.4Race Conditions, Atomicity, and VisibilityPhase XIV
ex-14-4-aObserve a Race Across Five RunsCodeWarm up20 min20 ptsex-14-4-bReproduce a Stale ReadCodePractice25 min25 ptsex-14-4-cWhat volatile Cannot DoCodePractice20 min25 ptsex-14-4-dRebuild the Parallel Stream FailureCodeChallenge30 min30 pts
14.5synchronized and Monitor LocksPhase XIV
ex-14-5-aTwo Keys, No ProtectionCodeWarm up25 min25 ptsex-14-5-bDeadlock in Ten LinesCodePractice25 min25 ptsex-14-5-cUse a Private Lock ObjectCodePractice25 min25 ptsex-14-5-dHold It for Less TimeCodeChallenge30 min30 pts
14.6wait, notify, and notifyAllPhase XIV
ex-14-6-aSleeping Inside a LockCodePractice20 min20 ptsex-14-6-bBreak It With an ifCodePractice25 min25 ptsex-14-6-cThe Notification That Arrived Too EarlyCodeChallenge25 min30 ptsex-14-6-dThen Throw It All AwayCodeWarm up25 min25 pts
14.7Explicit Locks and ConditionsPhase XIV
ex-14-7-aGive Up on a LockCodeWarm up25 min25 ptsex-14-7-bFind Where ReadWriteLock Starts WinningCodeChallenge30 min30 ptsex-14-7-cWake Only the Right GroupCodeChallenge30 min30 ptsex-14-7-dThe Unlock That Never RanCodePractice20 min20 pts
14.8Atomic Variables and Compare-and-SwapPhase XIV
ex-14-8-aFix the Counter Four WaysCodeWarm up30 min30 ptsex-14-8-bWrite incrementAndGet YourselfCodePractice25 min25 ptsex-14-8-cAtomic on One Field Is Not EnoughCodeChallenge25 min30 ptsex-14-8-dBuild a Lock-Free StackCodeChallenge30 min30 pts
14.9CAS Retry Loops and the ABA ProblemPhase XIV
ex-14-9-aChange It and Change It BackCodeWarm up25 min25 ptsex-14-9-bCorrupt Your Own StackCodeChallenge30 min30 ptsex-14-9-cCount the Wasted WorkCodePractice25 min25 ptsex-14-9-dRead Somebody Else's Lock-Free CodeCodeChallenge30 min25 pts
14.10Executors, Thread Pools, and FuturesPhase XIV
ex-14-10-aFifty Tasks, Two ThreadsCodeWarm up20 min20 ptsex-14-10-bThe Exception in the EnvelopeCodePractice25 min25 ptsex-14-10-cTwo Billion Waiting TasksCodeChallenge30 min30 ptsex-14-10-dDeadlock a Pool With One TaskCodeChallenge25 min30 pts
14.11CompletableFuture and Virtual ThreadsPhase XIV
ex-14-11-aTwo Thousand, Then a MillionCodePractice25 min25 ptsex-14-11-bStop Waiting for FuturesCodeWarm up30 min30 ptsex-14-11-cThe Value Left BehindCodeChallenge25 min30 ptsex-14-11-dPin the CarrierCodeChallenge30 min30 pts