THE FORSK PRACTICE ROOM
Learn it. Run it. Make it yours.
Free Java and SQL lessons with runnable examples, useful explanations and exercises you can check yourself.
Open lessons. No sign-up needed. Learn at your own pace.
CHOOSE YOUR NEXT TOPIC
15 lessons to work through
15 lessons
Java program structure: from source file to output
Run a complete Java program, trace main and a named method, and separate compile errors from incorrect results.
Java variables and operators: totals without truncation
Choose numeric types deliberately, understand integer division, and calculate a small invoice using whole paise.
Java control flow: validate, filter and count marks
Combine if, a loop and continue to process marks while making boundary decisions explicit.
Java classes and objects: model two independent scorecards
Create objects with constructors and see how separate instances hold separate state.
Java inheritance and polymorphism: dispatch the right behaviour
Use a base type to process different notification objects and see which overridden method executes.
Java interfaces: swap a formatter without changing the caller
Implement a small interface using ordinary named classes and pass different implementations to the same method.
Java encapsulation: protect a wallet balance
Keep state private and expose operations that preserve a simple, testable invariant.
Java List, Set and Map: choose the right collection
Compare repeated values, uniqueness and key-based lookup with deterministic output.
Java Iterator: remove matching elements safely
Remove failing marks through an ArrayList iterator and understand why direct structural changes during iteration are a problem.
Java exception handling: recover from one invalid input
Catch NumberFormatException at an input boundary while allowing later valid records to be processed.
SQL SELECT, WHERE and ORDER BY with a runnable dataset
Query a small student table, combine conditions and make the final row order deterministic.
SQL GROUP BY and HAVING: count learners by city
Aggregate rows into groups, filter groups with HAVING and avoid ambiguous ungrouped columns.
SQL INNER JOIN and LEFT JOIN: include learners with no enrolments
Join related tables and preserve unmatched students without accidentally counting a missing enrolment as a real one.
SQL NULL, COUNT and COALESCE: handle missing information
Distinguish a missing value from an empty string or zero, and interpret counts correctly.
SQL keys and constraints: reject invalid practice submissions
Define a small related table and understand which rules belong in database constraints.
No lessons match that search. Try a shorter topic name.
Build a learning habit that leaves evidence.
Save your working code, write down the mistake you corrected, and return to the exercise a day later. For guided classroom or online learning, explore the related Forsk courses.
Explore guided learning →