public class GenericFoo<T>
{
private T foo;
set{};get{};
}
GenericFoo<Boolean> foo1 = new GenericFoo<Boolean>();
GenericFoo<Integer> foo2 = new GenericFoo<Integer>();
public class Generic<T1, T2>
{
private T1 foo1;
private T2 foo2;
set{};get{};
}
Generic<Integer, Boolean> foo = new Generic<Integer, Boolean>();
public class Generic2<T>
{
private T[] fooArray;
set{};get{};
}
Generic2<String> foo = new Generic2<String>();
public class ListGenericFoo<T extends List>
{
private T[] fooArray;
set{};get{};
}
ListGenericFoo<LinkedList> foo1 = new ListGenericFoo<LinkedList>();
ListGenericFoo<ArrayList> foo2 = new ListGenericFoo<ArrayList>();
public class Parent<T1, T2>
{
private T1 foo1;
private T2 foo2;
set{};get{};
}
public class Child<T1, T2, T3> extends Parent<T1, T2>
{
private T3 foo3;
set{};get{};
}
public interface ParentInterface<T1, T2>
{
public void setFoo1(T1 foo1);
public void setFoo2(T2 foo2);
public T1 getFoo1();
public T2 getFoo2();
}