@vast coral Noticed that this code example does not work
https://javabook.mccue.dev/switch/exhaustiveness
enum Bird {
TURKEY,
EAGLE,
WOODPECKER
}
boolean isScary(Bird bird) {
switch (bird) {
case TURKEY -> {
return true;
}
case EAGLE -> {
return true;
}
case WOODPECKER -> {
return false;
}
}
}
despite returning from every branch of what should be an exhaustive switch, Java is not happy. I don't understand why this is or how to explain it properly, but i want to update that section so its not wrong.
Book teaching how to write modern and effective Java.