enum値からデータ値への変換はEnumGas.toString()、その逆はEnumGas.valueOf()だと予測し、前者は合っていたのですが、後者は次の様な場合にIllegalArgumentExceptionとなることが判りました。 EnumGas gas = EnumGas.valueOf("H2"); "H2"ではなく"SUISO"ならばenum値が取得できるのですが ...
Most Java developers have probably had their fill of NullPointerException. Most of us have learned the value of doing certain things to reduce our “opportunities” of encountering the ...