This project demonstrates capabilities of generics of java with lambada expressions.
This project demonstrates following capabilities of Generics with simple examples that are easy to understand. These examples are very simple but very effective as they are associated with daily routine programming.
This tutorial is helpful for beginners who want to understand Generics.
- type inference
- generic collection iteration using for each
- generic set example
- generic class example
- generic method example
- class Objects as type literals
- use of wildcards
Clone repository and run mvn package. Execute program by running command java -cp target/Generics-0.0.1-SNAPSHOT.jar com.github.generics.GenericsDemo