2. Language Fundamentals

2.1 (c)

52pickup is not a legal identifier. The first character of an identifier cannot be a digit.

2.2 (e)

In Java, the identifiers delete, thrown, exit, unsigned, and next are not keywords. Java has a goto keyword, but it is reserved and not currently used.

2.3 (b)

It is a completely valid comment. Comments do not nest. Everything from the start marker of a comment block (/*) until the first occurrence of the end marker of the comment block (*/) is ignored by the compiler.

2.4 (a) and (d)

String is a class, and "hello" and "t" denote String objects. Java only has the following primitive data types: boolean, byte, short, char, int, long, float, and double.

2.5 (a), (c), and (e)

Type (a) is a boolean data type, while types ...

Get Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.