Integer i = ...
    
switch (i) {
    case null:
        doSomething0();
        break;    
}

In the code above I can’t use null in the switch case statement. How can I do this differently? I can’t use default because then I want to do something else.

13 Answers
13

Leave a Reply

Your email address will not be published. Required fields are marked *