I suggest you do some searching whenever you think of a question. Quite a lot of your questions have answers that can easily be found on this board, on Wikipedia, in the Java Language Specification or Google. In other words: Search First.
T indicates Generic. Prior to java 5 when we use collections we used to specify it like List k=new ArrayList(); There is no restriction on what you can add and what you cant add into list. You can add any type of Object into the list. So Generics will allow you to specify what type of objects you can add into a collection. List<Animal> k=new ArrayList<Animal>(); Now this indicates that you can add Objects of type Animal into the collection, you cannot add objects of type Human or Vehicle into it. Generics allows to code type safe collections. Here T indicates a Generic Type. Hope you find it useful.
Originally posted by kranthi kumar.chamarthi: T indicates Generic. Prior to java 5 when we use collections we used to specify it like List k=new ArrayList(); There is no restriction on what you can add and what you cant add into list. You can add any type of Object into the list. So Generics will allow you to specify what type of objects you can add into a collection. List<Animal> k=new ArrayList<Animal>(); Now this indicates that you can add Objects of type Animal into the collection, you cannot add objects of type Human or Vehicle into it. Generics allows to code type safe collections. Here T indicates a Generic Type. Hope you find it useful.
If you ever feel like working hard.......sit back......until you get rid of that dangerous feeling.....