Java bootcamp

Question on the left. Your Java on the right. Check it.

Each lab is one problem: read the spec, write a solution, press Run, then Check. Hints stay closed. The correct code is there when you need it. javac grades stdout against hidden tests.

50 labs · 31 easy · 19 medium · progress stays in this browser.

  1. Read the questionInput, output, and a short example. Same shape as a classroom worksheet.
  2. Write Java, then RunThe starter is a skeleton. Change it, then see what happens.
  3. Check, or open a hintCheck runs every test. Hint and correct code stay folded until you open them.

Labs

Work them in order, or jump ahead when you are ready.

  1. 01easy

    Hello, Java

    Output · 5 min

    Open lab
  2. 02easy

    Sum two numbers

    Input · 8 min

    Open lab
  3. 03easy

    Even or odd

    If Else · 8 min

    Open lab
  4. 04easy

    Largest of three

    If Else · 10 min

    Open lab
  5. 05easy

    Times table

    For Loop · 10 min

    Open lab
  6. 06medium

    Maximum in a list

    ArrayList · 12 min

    Open lab
  7. 07medium

    Reverse a word

    Strings · 10 min

    Open lab
  8. 08medium

    Factorial method

    Methods · 12 min

    Open lab
  9. 09easy

    Celsius to Fahrenheit

    Math · 8 min

    Open lab
  10. 10easy

    Letter grade

    If Else · 10 min

    Open lab
  11. 11easy

    Squares 1 to n

    For · 8 min

    Open lab
  12. 12easy

    Sum 1 to n

    For · 8 min

    Open lab
  13. 13medium

    FizzBuzz

    For · 12 min

    Open lab
  14. 14medium

    Fibonacci n

    While · 12 min

    Open lab
  15. 15easy

    Count words

    Strings · 10 min

    Open lab
  16. 16easy

    Count vowels

    Strings · 10 min

    Open lab
  17. 17medium

    Palindrome word

    Strings · 10 min

    Open lab
  18. 18medium

    Anagram check

    Strings · 12 min

    Open lab
  19. 19easy

    Average

    Arrays · 10 min

    Open lab
  20. 20medium

    Second largest

    Arrays · 12 min

    Open lab
  21. 21easy

    Leap year

    If Else · 10 min

    Open lab
  22. 22easy

    Sum of digits

    While · 10 min

    Open lab
  23. 23easy

    Countdown

    For · 8 min

    Open lab
  24. 24easy

    Skip multiples of 3

    Break Continue · 10 min

    Open lab
  25. 25medium

    Is prime?

    For · 12 min

    Open lab
  26. 26medium

    GCD

    While · 12 min

    Open lab
  27. 27easy

    Star triangle

    Nested Loops · 10 min

    Open lab
  28. 28easy

    Safe divide

    Exceptions · 10 min

    Open lab
  29. 29medium

    Collatz steps

    While · 12 min

    Open lab
  30. 30easy

    Days in a month

    Switch · 10 min

    Open lab
  31. 31easy

    Absolute difference

    Math · 8 min

    Open lab
  32. 32easy

    Median of three

    Arrays · 10 min

    Open lab
  33. 33easy

    Day name

    Switch · 10 min

    Open lab
  34. 34easy

    Keep the evens

    ArrayList · 10 min

    Open lab
  35. 35easy

    Min and max

    Arrays · 8 min

    Open lab
  36. 36easy

    Linear search

    Arrays · 10 min

    Open lab
  37. 37medium

    Power by recursion

    Recursion · 12 min

    Open lab
  38. 38medium

    Unique sorted

    Set · 12 min

    Open lab
  39. 39medium

    Word frequency

    Map · 15 min

    Open lab
  40. 40medium

    Power of two?

    Operators · 10 min

    Open lab
  41. 41easy

    Count digits

    Strings · 8 min

    Open lab
  42. 42easy

    Title case

    Strings · 12 min

    Open lab
  43. 43medium

    Rectangle area

    Classes · 12 min

    Open lab
  44. 44easy

    Ternary minimum

    Ternary · 8 min

    Open lab
  45. 45easy

    Reverse array

    Arrays · 10 min

    Open lab
  46. 46medium

    Matrix sum

    2D Arrays · 12 min

    Open lab
  47. 47medium

    Sort by length

    Lambdas · 12 min

    Open lab
  48. 48medium

    Set intersection

    Set · 12 min

    Open lab
  49. 49easy

    Greet by name

    Strings · 8 min

    Open lab
  50. 50easy

    Sum an array

    Arrays · 10 min

    Open lab

FAQ: Java Bootcamp Labs

Common questions about this page.

What is the StudyGrid Java tutorial?

The StudyGrid Java tutorial is a full beginner-to-advanced track: syntax, types, input, loops, methods, classes, collections, generics, maps, and lambdas. Each chapter has copy-and-run examples.

Should I run java bootcamp labs examples locally for better learning?

Yes. Use the browser editor on StudyGrid for a quick check, then Download the example and run it on your computer. Local runs show real errors and the real toolchain, which is one of the fastest ways to learn java bootcamp labs in this Java Labs Java lesson (Java Bootcamp Labs).

Is the Java editor the same as Try Python or Try C++?

No. Try Java compiles with javac at /java/try and shows stdout plus compiler messages. Try Python stays at /try. Try C++ stays at /cpp/try. Java lessons never open those editors.

Do I need to install a JDK to learn Java?

No. Open a chapter, click Try it in Java, and compile in the browser. You can also download a .java file and compile locally with javac.

Where should I start the Java tutorial?

Start at Java Intro, then Get Started and Syntax. After the first program, continue to output, variables, and if-else. After classes, open Java Examples, then generics, map, and lambdas. Use Next at the bottom of each chapter.

Is the Java tutorial free?

Yes. The Java workshop on StudyGrid (studygrid.in) is free: dashboard, chapters, and the compile-and-run editor.