How to Create and Run Your First Java Application
Practice tasks: compile and run your first Java application from the command line, pass arguments to main(), build a JAR and add it to the classpath with -cp.
ExamClouds has 87 tasks for Java Core practice, split into 12 modules that follow the course: syntax, operators, control flow, arrays, OOP, the static keyword, Object methods, interfaces and enums, lambdas, the Stream API and algorithms. Many tasks come with a hint, and some with a solution and a video walkthrough. Tasks go from simple to more advanced and work for self-study, lab assignments and interview preparation.
5 modules · 36 tasks · ~11.5 h
Practice tasks: compile and run your first Java application from the command line, pass arguments to main(), build a JAR and add it to the classpath with -cp.
Practice Java syntax with hands-on tasks: literals, primitive type casting table, calculator methods, and reading user input with Scanner. With solutions.
A console garland of 32 bulbs that grows with the course: first you control the bulbs with bitwise operators in a single int, then add a mode menu with switch and loops, and finally rewrite the garland using an array.
Six Java operator exercises: an even number check, the minimum by absolute value, a bitwise garland, averages, a decrement countdown and a discount rule.
Practice Java basics with beginner coding tasks using if, switch, for, while, and do-while. Great for students and interview prep.
Java array exercises for beginners: create 1D and 2D arrays, find max and min, use Arrays.binarySearch() and System.arraycopy(). With solutions.
One console application that you grow from module to module: a product catalog, a cart, user login, a receipt with locale and date, saving to a file, serialization and a database via DAO.
5 modules · 33 tasks · ~16.5 h
17 hands-on Java OOP tasks: classes, this and super, overloading, inheritance, abstract classes, stack vs heap, garbage collection, final keyword.
Java static keyword exercises with solutions: count sold flowers with a static variable and build an abstract Fruit class that totals purchase cost.
Java exercises on Object class methods: default equals, hashCode and toString output, overriding toString() and equals(), and comparing objects with ==.
Java interface and enum exercises with solutions: instanceof, enums with fields, constructors and switch, abstract classes. Video walkthroughs included.
Seven hands-on Java lambda exercises: Predicate.and, Predicate.or, Consumer.andThen, Function, Supplier and method references, with video solutions.
2 modules · 18 tasks · ~8 h
Nine hands-on Java algorithm exercises: array average, Fibonacci numbers, Big O complexity, the swap method, array reversal, Bubble and Selection Sort, linear and binary search.
Nine hands-on Java Stream API exercises with Optional and Collectors: filter, map, reduce, groupingBy, joining, orElseGet. Code templates included.
Where can I practice Java for free?
Right here: all 87 exercises on ExamClouds are free and need no registration. They follow the free Java Core course, and every task page links to the lessons it practices. Write and run the code in your own IDE, for example IntelliJ IDEA: the tasks are not tied to an online editor.
Which Java exercises should a beginner start with?
Start with the Java tasks for beginners group: your first application, syntax, operators, control flow and arrays. Then move on to OOP and the standard library, and finish with lambdas, the Stream API and algorithms. Every module card shows its level, the number of tasks and the estimated time.
Can I use these tasks as Java assignments or lab work?
Yes. The tasks are grouped by course module and go from simple to advanced, so a module works as a ready set of Java assignments or homework. The mini projects on this page grow from module to module and work well as a running lab assignment.
Are there solutions to the Java exercises?
Many tasks include a hint right under the condition, and some come with a solution on Patreon and a video walkthrough. Try to solve each task on your own first, then compare your code with the solution.
How long does it take to finish all the tasks?
Each module card shows an estimated time, from about an hour to several hours. All 87 exercises across 12 modules take roughly 36 hours of focused practice.