Doing some summer vacation exercises for Java, and I'm trying to verify social security (specific for my country)
Something doesn't add up for me with charAt(0) Given social security "300198", it prints "Error 1" at the moment.
public void authenticateCpr(Member member){
if (member.getCpr().charAt(0) > 3) {
System.out.println("Error 1");
}
if (member.getCpr().charAt(0) == 3 && member.getCpr().charAt(1) > 9){
System.out.println("Error 2");
}
}
What am I missing? Happy summer Kind regards