I am using ArrayList to Store Time,Bid and, ASK value from the database. And I am unable to access the data from Arraylist in form of row wise like database. how can I do it.
Here is the code:-
List<String> graphData=new ArrayList<String>();
stmt = c.createStatement();
rs = stmt.executeQuery( "SELECT TIME,BID,ASK FROM '"+title+"' ;" );
System.out.println("Opened database successfully 20");
List<Double> buyMap=new ArrayList<Double>();
double buy_avg=0.0, bid=0.0, temp_profit, cum_prof=0;
while(rs.next()){
i++;
graphData.add(rs.getString(1));
graphData.add(df.format(rs.getFloat(2)));
graphData.add(df.format(rs.getFloat(3)));
}
Now how can I get the data from graphData. Because I have to put these value in graph.