问题
I have two list which have data items of String type.The lists are
List<String> all=new ArrayList<String>();
List<String> al2=new ArrayList<String>();
The items are added in the lists from Resultset as:-
all.add((rs.getString(3)));
all.add((rs.getString(4)));
al2.add((rs.getString(3)));
al2.add((rs.getString(4)));
There are numerical values in the list,I want to subtract the data items from list according to the column retrieved from resultset i.e
Subtract(rs.getString(3) of all,rs.getString(3) of al2)
and display there results.How to achieve this subtraction in lists?
来源:https://stackoverflow.com/questions/28358778/how-to-perform-subtraction-between-two-arraylist-items-in-java