Skip to content

← Code

Java Practice

Coding challenges from 1★ to 5★.

java 30 Lessons

Every lesson runs in your browser — write real code, press Run, and the tasks check themselves. Free, no account needed, with notes in English and Chinese.

Start the course

Lessons in this course

  1. 01 Print a word
  2. 02 Print another word
  3. 03 Print a sentence
  4. 04 Print with a !
  5. 05 Print two lines
  6. 06 Print a number
  7. 07 Add two numbers
  8. 08 Subtract
  9. 09 Multiply
  10. 10 Divide
  11. 11 Remainder
  12. 12 A number variable
  13. 13 A text variable
  14. 14 Add two variables
  15. 15 Your first method
  16. 16 Is it positive?
  17. 17 Cube a number
  18. 18 The smaller one
  19. 19 Square a number
  20. 20 Largest of three
  21. 21 Count the vowels
  22. 22 Reverse the word order
  23. 23 Palindrome check
  24. 24 Running sum
  25. 25 Most frequent character
  26. 26 Binary search
  27. 27 Factorial (mind the size)
  28. 28 Count primes below n
  29. 29 Roman numerals
  30. 30 Longest common prefix

Language reference

/know/reference/java

Log in or create account

IGCSE, A-Level & AP