This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Getting MEAN with Mongo, Express, Angular, and Node and have Simon Holmes on-line!
See this thread for details.
The moose likes Java in General and the fly likes problem different from c++ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Reply locked New topic

problem different from c++

sheng zhong

Joined: Nov 23, 2006
Posts: 20
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>();


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]
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 42199
Please don't ask the same question twice
Don't get me started about those stupid light bulbs.
subject: problem different from c++