I'm confused. The following code has errors ("..." represents the highlighted code):
int byteOrder = ...;
switch (byteOrder)
{
case HDF5Constants.H5T_ORDER_BE:
return ByteOrder.BIG_ENDIAN;
...
}
There is an error in the case argument, and Eclipse complains that "case expressions must be constant expressions." I looked at the source file for this, and it has a long list of lines, for example:
final public static int H5T_ORDER_BE = H5.J2C( JH5T_ORDER_BE );
I thought you could use constants final public static intas cases in a switch statement. I'm wrong???
source
share