Effective Java! Use Enums Instead of int Constants

public static final int APPLE_FUJI = 1;
public static final int APPLE_GRANNY_SMITH = 2;
public static final int APPLE_PIPPEN = 3;
// Somewhere else in the codepublic static final int ORANGE_NAVEL = 1;
public static

--

--

--

I'm a software architect that has a passion for software design and sharing with those around me

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

A New Android 12 Update Is Available For ASUS ZenFone 7 And 7 Pro

A New Android 12 Update Is Available For ASUS ZenFone 7 And 7 Pro

PHP Typed Properties: Think Twice.

Cucumber Testing on Spring Boot

#68 — Avoiding DevOps Continuous Disappointment

I’m joining Autify, a no-code AI-powered software testing automation platform

Farsite Game!

Shifting into 2nd gear — SCADE 2.0 Beta is there

Fields in Sri Lankan Software Industry

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kyle Carter

Kyle Carter

I'm a software architect that has a passion for software design and sharing with those around me

More from Medium

Checklist: When to write custom exceptions in Java

Pitfall When Using Java Okta SDK JWT Verifier

Developer-friendly event sourcing

What is the visitor design pattern? (Java)