5 Replies Latest reply on Jan 20, 2009 9:25 PM by 843785

    Basic Doubt regarding string comparision

      I have the following code:
      RegisterForm rf = (RegisterForm)form;
      String user = rf.getUsername();
      DTO ourdto = DBconnection.getDTO();               
      String pass = ourdto.getPword();
      When I print user,*pass* both the strings print "*pojo*"
      Now the condition I have to satisfy is

      pseudo code ---- if(*user* isequal to pass) { proceed forward }.

      I have used .equals but it is returning false,used equalsIgnoreCase and isContentEquals both are returning false.

      Could someone tell me if there is any method that can compare "pojo" to "pojo" and return a true.