File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "IF Else Error. Why?" Watch "IF Else Error. Why?" New topic

IF Else Error. Why?

Phillipe Rodrigues
Ranch Hand

Joined: Oct 30, 2007
Posts: 165


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

David O'Meara

Joined: Mar 06, 2001
Posts: 13459

never use '==' evaluation for Strings. Always "value".equals(value)
I agree. Here's the link:
subject: IF Else Error. Why?
jQuery in Action, 3rd edition