Java OCA OCP Practice Question 1277

Question

Which of the following are valid Java identifiers?

  • A. my-id
  • B. my_id
  • C. 101ids
  • D. id101


B and D.

Note

The only special characters that may appear in an identifier are _ and $.

Digits may not be used as the first character of an identifier.




PreviousNext

Related