Skip to content
C

Count the Keywords

Easyjava

Given a line of space-separated words, count how many are Java reserved words.

Treat these as the reserved words (plus the literals true, false, null): abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while.

Input: one line of words separated by single spaces.

Output: one line — the count of words that are reserved.

Input (stdin)

Output

Run your code to see output here...