Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does using an enum make an application less portable?

Tags:

java

enums

I know this question sounds bizarre, but that's what my manager told me. When I proposed a new design that made use of an enum, he said, "No, ...", and then went on to make an offhand comment that making use of such a construct actually makes the application "less portable".

Is this true? I suspect that it's not.

like image 946
mre Avatar asked Feb 21 '26 06:02

mre


1 Answers

You should ask him for me details... it does mean you wouldn't be able to compile the code in Java 1.4 or earlier, but that's not a terribly good justification.

Sounds like your manager may be confused... but you should always press for details.

like image 168
Jon Skeet Avatar answered Feb 24 '26 15:02

Jon Skeet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!