Quote:
public class Classification<t> {
Since your class should classify passed data, it makes no sense making it dependent upon a generic parameter.
Quote:
private ArrayList<t>integer = new ArrayList<t>();
private ArrayList<t>Double = new ArrayList<t>();
private ArrayList<t>string = new ArrayList<t>();
private ArrayList<t>character = new ArrayList<t>();
Why are you creating generic ArrayList when you know in advance they will hold just one type. For instance, why don't you use
private ArrayList<Integer>integer = new ArrayList<Integer>();
?
Quote:
I would like to add element to corressponding array list.
Hi
Just write the corrensponding overloaded
add
method, e.g.
public void add(Integer t)
{
}