A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Java in General
Author
problem different from c++
sheng zhong
Greenhorn
Joined: Nov 23, 2006
Posts: 20
posted
Apr 26, 2008 21:19:00
0
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]
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32717
4
posted
Apr 27, 2008 02:13:00
0
Please don't ask the same question twice
I agree. Here's the link:
http://aspose.com/file-tools
subject: problem different from c++
Similar Threads
differ by at most 10-6
problem about vector
Zooming in and out - cursor not in the right place
AffineTransoform will not translate origin
Why is this an unchecked cast?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter