Posted by Anonymous Wed 28th Feb 2007 14:18 - Syntax is Java - 35 views
Modification of posting from Anonymous Wed 28th Feb 2007 14:14
Download | New Post | Modify | Diff | Diff | Show line numbers
Modification of posting from Anonymous Wed 28th Feb 2007 14:14
Download | New Post | Modify | Diff | Diff | Show line numbers
import java.util.Vector;
public class vectors {
/**
* @param args
*/
public static void main([] args) {
v = new ();
v.add("TestA");
v.add("TestB");
v.add("TestC");
//does not compile without conversion
//String back = v.get(1);
back = () v.get(1);
.out.println(back);
//does not compile
//String[] list = v.toArray();
//compiles, but doesnt run
//String[] list = (String []) v.toArray();
}
}
public class vectors {
/**
* @param args
*/
public static void main([] args) {
v = new ();
v.add("TestA");
v.add("TestB");
v.add("TestC");
//does not compile without conversion
//String back = v.get(1);
back = () v.get(1);
.out.println(back);
//does not compile
//String[] list = v.toArray();
//compiles, but doesnt run
//String[] list = (String []) v.toArray();
}
}
PermaLink to this entry https://pastebin.co.uk/11161
The following amendments have been posted:
-
Anonymous (Wed 28th Feb 2007 14:38)
Posted by Anonymous Wed 28th Feb 2007 14:18 - Syntax is Java - 35 views
Modification of posting from Anonymous Wed 28th Feb 2007 14:14
Download | New Post | Modify | Diff | Diff | Show line numbers
Modification of posting from Anonymous Wed 28th Feb 2007 14:14
Download | New Post | Modify | Diff | Diff | Show line numbers
Comments: 0