0

Hello

Lets say I have these two classes;

public class BFF{
    private String name;
    private String surname;
    private Object friendships;
}
public class BFFG<T>{
    private String name;
    private String surname;
    private T friendships;
}

Is it possible to create a generic method that could create a Set of the information encapsulated in both BFF classes? So that I could ultimatively do something like this:

setOne<BFF> = fillSet();
setTwo<BFF<>> = fillSet();

Thank you for any info

Joey

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by JamesCherrill
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.