could someone please explain to me how to create a large arraylist of objects currently, this is what i have.
public ArrayList particlecollection;
public ParticleColl(Particle thorium)
{
particlecollection = new ArrayList<Particle>();
for(int i=1;i<=100;i++)
{
particlecollection.add("Thorium",24.07);
}
System.out.println(particlecollection.get(3));
}
The particlecollection.add("Thorium",24.07) is referring to a Particle class, which has 2 paramaters
Particle(String name, double halflife)
The error that I am being given is "cannot find symbol- method add(java.lang.string,double); maybe you meant add(Particle) or add(int,Particle).
Thank you so much for your help in advance.