public void setPunt(int index){
if(index >= 0 && index < PuntenLijst.size()){
x = 3;
y = 5;
}
}
I have got an array of object instances in an array list called PuntenLijst. With this method I want to use the index parameter to locate the object in the ArrayList and set the variables x and y that are defined in the object instance to 3 and 5.
This is how far I have gotten. Is there anyone who can help me out?
Thanks a lot!
PutenLijst.get(index).x=3?