The widely adopted convention is putting the default statement at the end of a switch statement. By adhering to this practice, your code becomes more comprehensible and predictable for developers who engage with it in the future.
Non-Compliant Code Examples
publicclassFoo{voidbar(inta){switch(a){case1:break;default:// this should be the last statementbreak;case2:break;case3:break;}}}