I created a class in a file called Pq which is an object having Strings like this
public class PQ {
String ec;
String com;
String ai[3];
String answers[3];
}
Now I want to make an array of this object of length 10. Then fill each of the individual elements like ec,com with data as per my requirement with a for loop like
for(i=0;i<10;i++)
pq.ec=25;
How to do this? I also want to fill ai,answers. How to access those elements I tried ArrayList but I am able to add the whole object but unable to add individual items Please help me out