File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Doubt???? 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 "Doubt????" Watch "Doubt????" New topic
Author

Doubt????

Kasak Tahilramani
Ranch Hand

Joined: Apr 06, 2006
Posts: 45

ANs:1 with input 'A' output is 1
2 with input 'X' output is 0
3 with input 'D' output is 0
4 method fails to compile.

Myquestion: explain with detail,not able to understand...


[HENRY: Added Code Tags]
[ January 22, 2007: Message edited by: Henry Wong ]
Anton Uwe
Ranch Hand

Joined: Jan 10, 2007
Posts: 122
Think about this code...
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11308
    
  16

What exactly do you not understand? what output do you think it should give?

Or is there a specific line/syntax you do not understand?


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Bijendra S. Rajput
Ranch Hand

Joined: Sep 19, 2006
Posts: 41
hi ,

I think the ans of this question is very simple. Whenever there is a comparison between two char with compound operator, actually we have to compare there unicode values.

So the ans is 1 and 2--------------
1 with input 'A' output is 1
2 with input 'X' output is 0

both are correct.

Please correct me if I am wrong.


Thanks <br /> <br />Regards,<br />------------------------------<br />Bijendra S. Rajput<br />SCJP 1.5<br />------------------------------
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt????