What is generics in Java?
In Java, Arrays are type safe, meaning of that if we are declaring an array of int, only integers can be assigned to it, If it is a string array only strings are allowed. But for collections till Java 5 there was no type safe mechanism available. To make the collections type safe is known as making it generic type.
For example:
List someList= new ArrayList();
Above list will allow only Animal objects to be assigned to someList List.
What is a static class member?
Methods declared static have the following properties/characteristics :
i. Static methods can only access static methods.
ii. They can only access static data
iii. Static methods can’t refer to this or super.