How null's are handled in switch statement in C#, Java and JavaScript
In Java null
's may show up in switch
statement when we switch
on primitive type wrappers like Integer
or on String
or on enum type. In that case Java will throw NullPointerException
as is demonstrated by program:
Read full article from How null's are handled in switch statement in C#, Java and JavaScript
No comments:
Post a Comment