Home » Tag Archives: Java Generics

Tag Archives: Java Generics

Polymorphism in Java Generics

java-logo

Since the early days as Java programmer we all know how to instantiate and use Collection objects. A List interface instantiated as a concrete class will look like the below. List myArrayList = new ArrayList(); If myArrayList is supposed to hold only Integer objects then from Java 5 compiler onwards as per Java Generics specification that instantiation will look like ...

Read More »

Overload API methods with care

jooq-2-logo

Overloading methods is a strong concept in API design, especially when your API is a fluent API or DSL (Domain Specific Language). This is the case for jOOQ, where you often want to use the exact same method name for various means of interaction with the library. Example: jOOQ Conditions package org.jooq; public interface Condition { // Various overloaded forms ...

Read More »

Java Generics Quick Tutorial

java-logo

Generics is a Java feature that was introduced with Java SE 5.0 and, few years after its release, I swear that every Java programmer out there not only heard about it, but used it. There are plenty of both free and commercial resources about Java generics and the best sources I used are: The Java Tutorial Java Generics and Collections, ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials