L4: Identifiers and Arithmetic Operators

Q1. Can we use a keyword as an identifier ? Explain in detail.

Keywords are the reserved words and there is a predefined meaning of these keywords known to the compiler. Keywords are used to provide some specific features and its job is already explained to the compiler. If we use a keyword as an identifier, we try to assign a new meaning to the keyword which is not acceptable. Hence, we cannot use a keyword as an identifier.

Q2. Specify the conventions followed in java to name different types of identifiers.

The following conventions are generally followed to name different types of identifiers

Q3. Find the invalid identifier names from the list below and explain the reason why these identifiers are invalid.