Try using a Map
, HashMap
is a possible choice.
HashMap<Integer, Long> dayValues = new HashMap<Integer, Long>();
dayValues.put(6, <put long value for 6 days here>);
dayValues.put(7, <put long value for 7 days here>);
dayValues.put(8, <put long value for 8 days here>);
dayValues.put(13, <put long value for 13 days here>);
...
tt2.setText(dayValues.get(jj[0]).toString());
This will use the integer value in jj[0]
to get the corresponding string value from the map and set it into tt2
.