How to store elements with different types of parameters

I want to store elements in a list, each elements having 4 parameters which are of different types (int, float, string). I thought of using an ArrayList but many person advised no to use one. Knowing what's the best way to do this could benefit many people.

What would be the best practice to do this?

Jon Skeet
people
quotationmark

An ArrayList is fine - but the element type should be something that combines the 4 values. For example:

List<Person> people = new ArrayList<>();
...

class Person {
    private final String firstName;
    private final String lastName;
    private final float weightKg;
    private final int somethingElse;

    ...
}

That's assuming you really meant what you said about each element having 4 parameters (attributes, properties, fields, whatever you want to call them). Encapsulating that set of information in a type makes life a lot simpler than the alternatives (e.g. a single list with first name, then last name, then weight, then something else, then the next first name etc).

people

See more on this question at Stackoverflow