A legal Java identifier must begin with a letter, underscore (_), or dollar sign ($), and cannot contain operators or special characters like '+' or apostrophes. 'maybe' is a perfectly legal identifier, whereas '2answer' starts with a digit, 'foo+bar' contains an addition operator, and 'can't_decide' contains an apostrophe.