Something like this:
public class Type
{
//code
}
public class TypeA extends Type
{
//code
}
public class TypeB extends Type
{
//code
}
I want to create a third class named Type C that includes all values of both Type A and B.
For example, lets say that both Type A and B have two values and I want to make something like this in the main class:
Type c = new TypeC(TypeA(value, value), TypeB(value, value));