Layers of Logic

Practice

Use each exercise to test one idea.

Every task has a permanent ID and belongs to one lesson. Work in order while following the course, or use this catalogue to return to a topic that needs more practice.

235 exercises5550 points98 hours29 build The Registry

Run the checks in VS Code.

The Layers of Logic extension fetches the task, starter code, and readable checks. Compilation and testing happen on your machine, and your solution is not uploaded.

Some design and explanation tasks still require your own judgement. They are marked honestly instead of being forced through an unreliable automatic score.

Get the extension

1.1Why Java ExistsPhase I

1.2JVM, JRE, JDK, and Your First ProgramPhase I

2.1Variables, Types, Literals, KeywordsPhase II

2.2How Numbers Live in MemoryPhase II

2.3Type Conversion, Promotion, CastingPhase II

3.1OperatorsPhase III

3.2ConditionalsPhase III

3.3Loops and Jump StatementsPhase III

4.1ArraysPhase IV

4.2How Arrays WorkPhase IV

5.1Methods, Calls, Recursion, and OverloadingPhase V

6.1Classes, Objects, and `new`Phase VI

6.2Constructors, Chaining, `this`Phase VI

6.3Objects in Memory: Size, Copying, PassingPhase VI

6.4`static` and `final`Phase VI

7.1Encapsulation, Inheritance, Packages, and `super`Phase VII

7.2Abstraction, Polymorphism, Abstract Classes, and InterfacesPhase VII

7.3Wrapper Types, Autoboxing, and POJOsPhase VII

7.4Static Nested, Inner, Local, and Anonymous ClassesPhase VII

8.1Java I/O: Streams, Scanner, BufferedReaderPhase VIII

8.2Immutable ClassesPhase VIII

8.3The Object Class: `equals`, `hashCode`, `toString`Phase VIII

8.4EnumsPhase VIII

8.5Interfaces Deep DivePhase VIII

9.1Strings: The Pool and ImmutabilityPhase IX

9.2String Methods and StringBuilderPhase IX

9.3GenericsPhase IX

9.4Wildcards: `extends` and `super`Phase IX

10.1The Collections FrameworkPhase X

10.2Iterable and the IteratorPhase X

10.3The Collection InterfacePhase X

10.4List: ArrayList, LinkedList, Vector, StackPhase X

10.5Set and Map: Inside HashMapPhase X

10.6Map Methods, EnumMap, and the Rest of the FamilyPhase X

10.7Queue, Deque, and PriorityQueuePhase X

10.8Comparable, Comparator, and SortingPhase X

11.1Lambdas and Functional InterfacesPhase XI

11.2Method References and the Four ShapesPhase XI

11.3Streams, and When the Work HappensPhase XI

11.4The Operations, and What collect Really DoesPhase XI

11.5Optional, and the Habit It Is Trying to BreakPhase XI

11.6Parallel Streams and the Primitive OnesPhase XI

12.1Exceptions, Errors, and the Stack TracePhase XII

12.2Checked, Unchecked, and Exceptions of Your OwnPhase XII

13.1Where Everything Actually LivesPhase XIII

13.2What Makes an Object GarbagePhase XIII

14.1What a Thread Actually IsPhase XIV

14.2Two Ways to Make One, and Six StatesPhase XIV

14.3Asking a Thread to StopPhase XIV

14.4Three Ways Two Threads Break One FieldPhase XIV

14.5The Lock Every Object Already HasPhase XIV

14.6Waiting for Something to HappenPhase XIV

14.7Locks You Can Give Up OnPhase XIV

14.8Counting Without a LockPhase XIV

14.9The Value Came BackPhase XIV

14.10Stop Making ThreadsPhase XIV

14.11Futures That Do Not Block, and Threads That Are Nearly FreePhase XIV