I have problem in doing looping for iteration. It kept throwing ConcurrentModificationException whenever I try to make a loop. What I'm trying to do is displaying input data from database in JFreeChart GUI. I've been working for hours doing this. I saw some question almost similar but mine differs is displaying from MySQL Database
Here's is some of my codes:
    public static ArrayList<String> s  = new <String> ArrayList() ;
    public static ArrayList<Double> d  = new <Double> ArrayList() ;
    public static Iterator op1 = s.iterator();
    public static Iterator op2 = d.iterator();
DefaultCategoryDataset dataset = new DefaultCategoryDataset( );
    while(op1.hasNext()){
    Object a= op1.next();
    Object b= op2.next();
    String c = (String) a;
    double d = (double) a;
    dataset.addValue(d , speed , c);  
  }  
 
    