Skip to content
C

Is It a Valid Identifier?

Mediumjava

Read one line of text and decide whether it is a valid Java identifier.

A valid identifier: is non-empty; starts with a letter, _ or $; every character is a letter, digit, _ or $; and is not a Java reserved word (also excluding true, false, null).

Input: one line — the candidate (it may contain spaces, which make it invalid).

Output: Valid or Invalid.

Input (stdin)

Output

Run your code to see output here...