Computer Science, asked by shreya25498, 6 months ago

• Which of the following are valid Java identifiers? If invalid,
give reason:
i.Double
ii.2CS
iii.Big_N
iv.$67
v.Boolean
vi._number​

Answers

Answered by royrishi1819
1

i) Double is not a valid Java identifier because Double is a Java keyword.

ii) 2CS is not a valid Java identifier because identifier naming not starts with number so it is invalid identifier.

iii) Big_N is a valid identifier because it starts with letters.

iv) $67 is a valid because it starts with $ sign.

v) Boolean is not a valid identifier because boolean is a Java keyword.

vi) _number is valid because it starts with underscone.

Similar questions