Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources. Birgitta Böckeler, Distinguished Engineer at ...
Community driven content discussing all aspects of software development from DevOps to design patterns. Here are the most important concepts developers must know when they size Java arrays and deal ...
Method references are a shorthand way to write lambda expressions that call a single method. Rather than implementing a method in a functional interface, a method reference simply points to an ...
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 ...
Copying objects is a common Java programming operation that has one serious trap. Here's how to avoid copying from an object reference and only copy the instance and values you want. Copying objects ...
The Java Iterator is an all-purpose interface that simplifies looping through a collection of objects. Java's ListIterator provides all the functionality of the Iterator interface, with four ...
It's not terribly clean, but you could use indexOf() and check if it returns -1. Better than breaking out a loop.