1.

Identify the identifiers as valid or invalid (reason if invalid) i. break ii. Program 1​

Answer»

i) invalid (reserved keyword)ii) validExplanation:Rules for identifier:A valid identifier must have CHARACTERS [A-Z] or [a-z] or numbers [0-9], and underscore(_) or a dollar SIGN ($). There should not be any space in an identifier. An identifier should not contain a number at the starting.We can't USE the JAVA reserved keywords as an identifier such as int, float, double, char, etc. An identifier should not be any query language keywords such as SELECT, FROM, COUNT, DELETE, etc.List of Valid identifiers:1. xyz2. fvariable3. a4. cal_sum5. _product6. $money7. variable1238. num9. thisIsMe10. hello_Me1Refer to the attachment to see the list of reserved keywords(cannot be used as identifier).



Discussion

No Comment Found