I am preparing for my school test and i have a Simple question:
Which of the following is a VALID identifier?
a. this
b. that
c. int
d. double
e. not of the above
I think the answer is b.that do you agree and why?
I am preparing for my school test and i have a Simple question:
Which of the following is a VALID identifier?
a. this
b. that
c. int
d. double
e. not of the above
I think the answer is b.that do you agree and why?
Your answer:
a. that
In java you are not allowed to use keywords as identifiers.
this
is a keyword for pointing to current object
int
is a keyword for primitive integer type
double
is a keyword for primitive double type.
P.S: You are not supposed to ask questions, without research and efforts. I am not supposed to promote such questions by answering...:)