KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am still learning about generics and have a question. Say you had this generic class: public class Test<T> { public static void main (String[] args) { Test t1 = new Test(); Test<String> t2 = new Test<String>(); Test t3 = new Test<String>(); } } All the statements compile but I don't really know what makes them different. Can anyone give me a brief explanation on those three statements.
Tags (comma-separated)
Save Edits
Cancel