Java 8 - Avoid null pointer exception on object calls

Optional.ofNullable().orElse(new ())).toString();

for example:

Comments

Popular posts from this blog

Hibernate - HibernateException: createQuery is not valid without active transaction