The program is quite simple, x, y, z are Doubles that are constantly updated and I keep the first 2 values of each in an ArrayList and then I want to show them on the screen (I know I could have done a for but copy and paste was faster for 6 XD values)
List<Double> list = new ArrayList<Double>();
for(int i=0; i<5;i=+3){
list.add(i,x);
list.add(i+1,y);
list.add(i+2,z);
}
System.out.println(list.get(0));
System.out.println(list.get(1));
System.out.println(list.get(2));
System.out.println(list.get(3));
System.out.println(list.get(4));
System.out.println(list.get(5));
The problem is that the program is running but it does not show the values on the screen (it does not skip any exception, it just remains blank and gives you the option to terminate the program, so I know it's running). bug in the code?