Why does java not allow String objects to be used in the switch/case statements? Couldn't the compile invoke hashcode() on those strings thus producing a unique integer value to represent the constant in the cases?
Name:
Anonymous2011-10-21 6:56
As promised here is my C string switch:
/*
strswitch.h
Written in 2004 by Anonymous.
ENTERPRISE-GRADE C
*/
#ifndef _STRSWITCH_H
#define _STRSWITCH_H
#include <stdlib.h>
#include <string.h>
void *strswitch_var;
int strswitch_loop;
int strswitch_enter;