Sam Samson wrote:Hi
I'm wondering why I can't use an Integer as a case constant:
Autoboxing seems to work in the switch() statement, but not for the case?
Because auto-unbox turns
case finalInteger into
case finalInteger.intValue(), and calling intValue() makes it non a constant.