calculate sum of values (current due,past due,past due 30,past due 60 and over 90) from column and compare with last column Ar_exposure.
so far I tried code below:
public class Employee {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new FileReader("C:\\Users\\user123\\Desktop\\test.txt"));
HashMap<String,ArrayList<String>> map = new HashMap<String,ArrayList<String>>();
int linenumber =1;
String[] ColumnName =null;
ArrayList<String[]> value = new ArrayList<String []>();
String line;
String[] arr;
while(reader.ready())
if(!(line=reader.readLine()).isEmpty()) {
arr =line.split(";");
if(linenumber==1)
ColumnName = arr;
else
value.add(arr);
linenumber++;
}
for (int i=0;i<ColumnName.length;i++) {
ArrayList<String> ar = new ArrayList<String>();
for(int j=0;j<value.size();j++) {
ar.add(value.get(j)[i]);
map.put(ColumnName[i], ar);
}
System.out.println(map);
}
}
}
Im able to capture the values from column but Im unable to add values.