Type the generic class header and fields
Type the generic class header and fields
Answer
public class TwoTuple<A, B> { public final A first; public final B second; }
A and B are type parameters declared after the class name. Inside the class they act as types for the fields. Each object instantiated with concrete arguments (e.g. TwoTuple<String, Integer>) binds A and B to those types.