[Solved] Turn void method into a boolean-java [closed]


First change the method signature to return a value:

public static boolean checkUSPASS(String a,String b)

Then return a value from within the method:

return true;

or:

return false;

Note that all code paths must return some value. So you have this in your try block:

if (rs.next()) {
    return true;
}
else {
    return false;
}

But in the event of reaching your catch block, something must still be returned:

catch (SQLException ex) {
    ex.printStackTrace();
    return false;
}

5

solved Turn void method into a boolean-java [closed]