File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes IF Else Error. Why? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "IF Else Error. Why?" Watch "IF Else Error. Why?" New topic
Author

IF Else Error. Why?

Phillipe Rodrigues
Ranch Hand

Joined: Oct 30, 2007
Posts: 165





Try1.class







What should be the output for (2) and (3) and why?


Thanks,
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

never use '==' evaluation for Strings. Always "value".equals(value)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IF Else Error. Why?
 
Similar Threads
Collections problem
return value???
Question mark in Java
Short-Circuit Evaluation
Constructor Chaining