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