0
Java attribute define
I need to define an attribute like Long district And this district attribute need to contain more than 10 values And each value's value update or increase count
1 ответ
+ 1
write a class if values are of different types
class District {
Type1 t1;
Type2 t2;
}
if there are values of same type and purpose use an array
int[] num = new int[10];
or
var data = new ArrayList<Type1>();