Java OCA OCP Practice Question 1528

Question

Which of the following is/are illegal Java identifier(s)?

Select 1 option

  • A. num
  • B. int123
  • C. 2Next
  • D. _int
  • E. a$_ 123


Correct Option is  : C

Note

A valid java identifier is composed of a sequence of java letters and digits, the first of which must be a letter.

It is not clear from the objectives whether this topic is included or not.

Regardless, it is good to know how to declare a valid identifier.




PreviousNext

Related