I have to get the first element of each vector and add into another vector and continue till mainVector ends
mainVector -- > [[1,Allen,2000,10],[2,Joe,3000,20],[3,King,4000,40]]
[Vector(Vectors)]
output should be -- > [[1,2,3],[Allen,Joe,King],[2000,3000,4000],[10,20,40]]
[Vector(Vectors)]
int i=0;
Vector outputVector = new Vector();
for(int p = 0; p < mainVector.size(); p++)
{
Vector second = new Vector();
for(int h = 0; h < mainVector.size(); h++)
{
eachVector = mainVector.get(h);
String eachElement = eachVector.get(i);
second.add(eachElement);
}
outputVector.add(second);
i++;
}