Simon Serrano

Logo

I am a Software Engineer with a passion for UI/UX design, backend development, and DevOps. Outside of work, I enjoy calisthenics, yoga, acrobatics, running, drawing, and CAM.

View My GitHub Profile

View My LinkedIn Profile

Post Logo

Java

You may already be familiar with Java, but if not, it’s worth noting that Java is a versatile and widely-used programming language. Known for its platform independence, Java allows developers to write code once and run it anywhere, thanks to the Java Virtual Machine (JVM). It’s a high-level, object-oriented language that has become a cornerstone of software development, powering everything from enterprise applications to Android mobile apps and web servers.

My Best Practices

My recommended best practices for Java are both common and widely adopted. Moreover, these practices are versatile and can be applied to most object-oriented programming (OOP) languages.

Visit My General Coding Best Practices

Leverage polymorphism

Avoid inheritance

Handle Exceptions

See also my general best practices on exception handling

Avoid Concurrency

See also my general best practices on concurrency

Streams

Shorthand Type Declaration (Java 10+)

Prefer Ifs Over Switches

See also my general best practices on switch statements

Optional ain’t an option

Optional does not support primitive types

Testing

This page is still a work in progress