0
Is default case compulsary?
2 Respostas
+ 4
No, you can use switch without default. Just that the cases not listed in case won't be handled.
+ 3
No.
Let's say you have a number between 1 and 10.
If you only define case 1, 2 and 3, in case of 4 to 10 nothing happens.