Abstract


Java Example

We can do List<Integer> intList = new ArrayList<>() instead of List<Integer> intList = new ArrayList<Integer>(), the Compiler is smart enough to figure out the Datatype for ArrayList based on the context provided by List<Integer>

Reduce boilerplate code

More concise & readable. However, too much may reduce the readability