Exercise :
1) Are the following identifiers valid or invalid. Give reason if invalid.
a) A b) name c) 2Sem
d) ut2_th_mks
e) class f) _address g) th+prac
h) NAME
i) feb sales j) 3 k) BASICSALARY 1) basic
m)basic-hra
n)#MEAN
O)group p)422
population in 2006 rover time
s)mindovermatter
t)SINGLE
u)hELLO
v queue
r)team's victory
s)Plot#3
t)2015 DDay u)3rd-row
Its from JAVA chapter - class 9
Answers
Answer:
a) valid
b) valid
c) invalid. identifier name cannot begin with a digit.
d) valid.
e) invalid. it is a Java keyword.
f) valid
g) invalid. special character other than (_) and ($) are not allowed.
h) valid
i) invalid. space is not allowed in the identifier name.
j) invalid. identifier name cannot begin with a digit.
k) valid
l) valid
m) invalid. special character other than (_) and ($) are not allowed.
n) invalid. special character other than (_) and ($) are not allowed.
o) valid
p) invalid. identifier name cannot begin with a digit.
q) invalid. space is not allowed in the identifier name.
r) invalid. space is not allowed in the identifier name.
s) valid
t) valid
u) valid
v) valid
w) invalid. space is not allowed in the identifier name.
x) invalid. special character other than (_) and ($) are not allowed.
y) invalid. identifier name cannot begin with a digit.
z) invalid. identifier name cannot begin with a digit.
Explanation:
PLEASE MARK MY ANSWER AS BRAINLIEST .
Answer:
a) valid
b) valid
c) invalid. identifier name cannot begin with a digit.
d) valid.
e) invalid. it is a Java keyword.
f) valid
g) invalid. special character other than (_) and ($) are not allowed.
h) valid
i) invalid. space is not allowed in the identifier name.
j) invalid. identifier name cannot begin with a digit.
k) valid
l) valid
m) invalid. special character other than (_) and ($) are not allowed.
n) invalid. special character other than (_) and ($) are not allowed.
o) valid
p) invalid. identifier name cannot begin with a digit.
q) invalid. space is not allowed in the identifier name.
r) invalid. space is not allowed in the identifier name.
s) valid
t) valid
u) valid
v) valid
w) invalid. space is not allowed in the identifier name.
x) invalid. special character other than (_) and ($) are not allowed.
y) invalid. identifier name cannot begin with a digit.
z) invalid. identifier name cannot begin with a digit.
Explanation:
Please Mark me as brainliest