how to check whether these two strings are equal in Java using if...else block.
            String passw1=(String)request.getParameter("pass");
            System.out.println("value of passw1"+passw1);
            String passw2=(String)request.getParameter("pass1");
            System.out.println("value of passw1"+passw2);
            //String a=passw1;//String b=passw2;
            if(passw1.equals(passw2))
            {
            out.println("Password matches");
 
     
     
    