File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Ques from ((khalid mughal)) very Confusing?

Ajay Singhal
Ranch Hand

Joined: Jan 10, 2001
Posts: 37
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
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

[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

Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
I agree. Here's the link:
subject: Ques from ((khalid mughal)) very Confusing?
It's not a secret anymore!