Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem different from c++

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
import java.util.*;
public class test {

public static void main(String args[]){

Vector<Vector<Double>> Stree = new Vector<Vector<Double>>();
Vector<Double> Svec = new Vector<Double>();

Svec.add(100.0);
Stree.add(Svec);
Svec.add(200.0);
Stree.add(Svec);


System.out.println("Stree 0 is "+Stree.get(0));
System.out.println("Stree 1 is "+Stree.get(1));
}
}


How can I get the result like this as C++:

Stree 0 is [100.0]
Stree 1 is [100.0, 200.0]
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please don't ask the same question twice
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic