Learn Java by playing a game

Java Cricket โ€” twelve balls of Java. Play what you know, leave what you don't.

A target, twelve balls, and sixty seconds a ball. Every delivery is one Java question with four strokes on it. Pick the right one and it pays by the clock โ€” six if it went inside twelve seconds, down to a single at the death. Pick the wrong one, or none at all, and you are bowled for four. Leave it alone on purpose and it is a dot ball, costing only the ball itself.

Play Java Cricket โ†’

Free, and no account needed โ€” play as a guest. Runs in the browser โ€” nothing to install.

What it teaches

Twelve topics are on the syllabus and a match prefers one it has not bowled yet, so twelve balls are twelve different ideas:

The difficulty climbs across the over rather than sitting flat:

BallsBandWhat it asks of
1โ€“4easysomebody who has written a first class
5โ€“8mediumsomebody who has finished a tutorial
9โ€“12hardsomebody who has read another person's code and worked out why it broke

What a ball pays

Answered inRuns
12s6
24s4
36s3
48s2
60s1

The clock is the scoring. Every button is worth the same, so the difference between a single and a six is only how fast the Java was read. Inside the first fifth means the snippet was read and the answer known; the last fifth means it was worked out โ€” which still counts, but only for one. There is no five, because cricket has no five.

Why cricket, and why sixty seconds

The cricket is the mechanic; the Java is the point. Sixty seconds is long enough to read a snippet you understand and far too short to work out one you do not โ€” so the clock sorts recognition from reconstruction without anyone having to ask you which it was. And because leaving a ball is a legal move that costs almost nothing, the game rewards knowing what you do not know, which most quizzes punish.

Questions and answers

Is this for complete beginners?

The first four balls assume you have written a class. If you have not yet, start there and treat the later balls as a map of what is coming.

Does a wrong answer end the match?

No โ€” there are no wickets. Every ball is faced however often you are bowled; being bowled costs four runs off the chase, not your innings.

Is it free?

Yes. Every game on SULULU is free and there is nothing to buy.

The other games on SULULU