How to compare a string to an array? : I am trying to compare a string to an array but it doesn't seem to work... My code is shown below...

    if(rs.getString(1).equals(array[0]) && rs.getString(7).equals(array[6])){
        JOptionPane.showMessageDialog(null, "not updated");
    }
how can I do the comparison?