For example, I am calling a scanner from the user.
double second = sc.nextDouble();
double multiplayer = sc.nextDouble();
v.add(second);
v.add(multiplayer);
And when I display the vector output these 2 inputs appear in 2 lines. Is there anyway to put these 2 elements in a single vector?
e.g. input second is 5.0
input multiplayer is 1.4
display vector will be:
5.0
1.4
Is there anyway to make them in a single vector like
5.0 1.4?
Please help :(