I have an application that receive some vectors inside one main vector. The user set the information to the arrays
vector1 {a, b}
vector2 {1, 2}
vector3 {x, y}
vector4 {20,21}
vector5 {s,t}
mainVector {vector1,vector 2,vector3,vecto r4,vector5}
and i print the information on the screen as follows
a 1 x 20 s
b 2 y 21 t
my problem is when the user set just one value in the vector, for example the user don't set the x value:
a 1 20 s
b 2 y 21 t
this throw me an ArrayIndexOutOf BoundsException
is there something that i can do, or i should use arrays instead vectors
vector1 {a, b}
vector2 {1, 2}
vector3 {x, y}
vector4 {20,21}
vector5 {s,t}
mainVector {vector1,vector 2,vector3,vecto r4,vector5}
and i print the information on the screen as follows
a 1 x 20 s
b 2 y 21 t
my problem is when the user set just one value in the vector, for example the user don't set the x value:
a 1 20 s
b 2 y 21 t
this throw me an ArrayIndexOutOf BoundsException
is there something that i can do, or i should use arrays instead vectors
Comment