Someone
public text v1 · immutableprivate BigInteger lueIsoLuku(Scanner nappis) {
BigInteger paluu;
boolean kelpo = false;
while(!kelpo) {
try {
paluu = nappis.nextBigInteger();
kelpo = true;
} catch (InputMismatchException ime) {
System.out.println("Epäkelpo isoluku!");
kelpo = false;
}
}
return paluu;
}