Generics

Generics is a great way to prevent bugs at compilation time since provide compile-time type checking and removing risk of ClassCastException that was common while working with collection classes. Another important advantage in using generics is that you can write code that use abstractions instead using concrete classes, so you can create maintainable and extendable code. Following example illustrates how we can print an array containing different types using a single Generic method: [Read More]

Java

There are three main features in Java 8 that I love, one of them is the lambda expressions, it will have enormous implications for simplifying development. The another one is the new java.util.stream package provide a Stream API to support functional-style operations on streams of elements. The Stream API is integrated into the Collections API, which enables bulk operations on collections, such as sequential or parallel map-reduce transformations. And lastly but not least the java. [Read More]