Add code to generics Main.java