Get your CodeRanch badge!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Ques from ((khalid mughal)) very Confusing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Ques from ((khalid mughal)) very Confusing?" Watch "Ques from ((khalid mughal)) very Confusing?" New topic
Author

Ques from ((khalid mughal)) very Confusing?

Ajay Singhal
Ranch Hand

Joined: Jan 10, 2001
Posts: 37
Hi!
I'm getting a problem in one simple Ques.
Select all valid answers?
1)char a='\u0061';
2)char \u0061='a';
3)ch\u0061r a='a';
ans : All are valid!!
------------------
Sahir Shah
Ranch Hand

Joined: Nov 05, 2000
Posts: 158
Ajay,
If I am not mistaken char a='\u0061'; does not confuse you. I was sorely tempted to give you the answer straightaway, but , since Khalid has gone to so much trouble to create a question which is so fiendish and yet so simple I cannot give you the answer. However I shall give you a hint.
\u0063h\u0061r r = 'x';
Is also valid. Compile it and see for yourself.
I like this question. Its so
Cheers
Sahir

sahirshah@emirates.com

www.geocities.com/sahirshah

[This message has been edited by Sahir Shah (edited January 13, 2001).]


....
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi ..
I'm closing this thread ... see duplicate post and answers in http://www.javaranch.com/ubb/Forum24/HTML/007246.html
Jane


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Ques from ((khalid mughal)) very Confusing?
 
Similar Threads
Ques on intern
((khalid mughal's)) Ques. on char Confusing?
Valid Declarations
Unicode
What are the valid identifiers in the code given?