File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Mock Exam Errata and the fly likes Java Identifiers ! Question Maji exam Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Mock Exam Errata
Reply Bookmark "Java Identifiers ! Question Maji exam" Watch "Java Identifiers ! Question Maji exam" New topic
Author

Java Identifiers ! Question Maji exam

Nirmala
Ranch Hand

Joined: Jun 28, 2000
Posts: 93
Hi all,
Which of the following are valid Java identifiers?
a) _3_
b) $abcp
c) this
d) instance
e) thisabigvariable
f) 2i#
My answer is a,b,d,e.
Given Answer is a,b,c,d,e
Can 'this' be a valid identifier?.
May be very basic Question,but by looking at the answer I am somewhat upset. When I try putting 'this' in an program I got an compilation error. To confirm my answer I am posting this.
Help me.
Thanks in advance.
Nirmala
rumit
Greenhorn

Joined: Jul 12, 2000
Posts: 5
this is not a valid identifier
i think the book in u read is wrong.
Uthirapathi Prabu
Greenhorn

Joined: Jul 17, 2000
Posts: 19
hai nirmala,
"this" is not a valid identifier.
It refers to the current executing object.
"this" is the reserved word for java
prabu
------------------
Nirmala
Ranch Hand

Joined: Jun 28, 2000
Posts: 93
HI rumit,
Thank you all for your help.
This is from Maji exam which is specified in the Subject.
Thanks
Nirmala
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Yes Nirmala. The word 'this' can not be a valid identifier. Let us move this thread to our 'Mock Exam Errata' forum.
regds
maha anna
Joseph Zhou
Ranch Hand

Joined: Aug 01, 2000
Posts: 129
this is a Java keyword. keyworks are reserved identifiers that predefined inthe language.
 
 
subject: Java Identifiers ! Question Maji exam
 
Threads others viewed
Valid Identifier Question
Queries
Sun Guoqiao's mock exam about identifiers?
String - is it a valid identifier? (simple question)
pgjc - mock exam questions (answers incorrect)?
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture