If you are fortunate enough to be using JDK 7, the newly available Objects class is the obvious (at least to me) choice for implementing the “common” Java object ...
It's not terribly clean, but you could use indexOf() and check if it returns -1. Better than breaking out a loop.
package dustin.examples; import java.util.Objects; /** * Simple class to be used in demonstration of JDK 7's java.util.Objects class. * * @author Dustin */ public class Person { private String ...
Community driven content discussing all aspects of software development from DevOps to design patterns. In this Java serialization example, we will use both the ObjectOutputStream and the ...
Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources. Dany Lepage discusses the architectural ...
A monthly overview of things you need to know as an architect or aspiring architect. Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with ...
Community driven content discussing all aspects of software development from DevOps to design patterns. If you want to master functional programming, the best place to start is with the Java Function ...