I have the following code
ArrayList<Integer> Analysis = new ArrayList<>();
ArrayList<Integer> designInitialBuild = new ArrayList<>();
ArrayList<Integer> Production = new ArrayList<>();
ArrayList<Integer> Strategy = new ArrayList<>();
ArrayList<Integer> Testing = new ArrayList<>();
System.out.println("jTableLength: " + jTable1.getRowCount());
for(int xn=0;xn==jTable1.getRowCount();xn++){
System.out.println(jTable1.getModel().getValueAt(xn, 3).toString());
switch(jTable1.getModel().getValueAt(xn, 3).toString()){
case "Analysis":
Analysis.add(xn);
break;
case "Design & Initial Build":
designInitialBuild.add(xn);
break;
case "Production":
Production.add(xn);
System.out.println("Production");
break;
case "Strategy":
Strategy.add(xn);
break;
case "Testing":
Testing.add(xn);
break;
default:
System.out.println("I am Broken");
break;
}
}
System.out.println(Production.size());
When I debug the code it shows that the variable xn has a value of -8, it never goes into the for loop and does the first "println"
Before the loop where I did System.out.println("jTableLength: " + jTable1.getRowCount());
it displays 48..... i'm so very confused.