In my Java program, I want to store a list of primitive values. I could do something like this:
int x = 0;
double timestamp = 123.1d;
List<Object> data = new ArrayList<Object>();
data.add(x);
data.add(timestamp);
But then the problem is that I do not know exactly what kind of objects i store in the list. So is there any better way to do that?