Why can’t your switch statement data type be long, Java?
I think to some extent it was probably an arbitrary decision based on typical use of switch. A switch can essentially be implemented in two ways (or in principle, a combination): for a small number of cases, or ones whose values are widely dispersed, a switch essentially becomes the equivalent of a series of ifs … Read more