-11

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?

Konstantin Yovkov
  • 62,134
  • 8
  • 100
  • 147

1 Answers1

1

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...:)

user1933888
  • 2,897
  • 3
  • 27
  • 36