Missing required fields
Posted by Anonymous Wed 28th Feb 2007 14:18 - Syntax is Java - 34 views
Modification of posting from Anonymous Wed 28th Feb 2007 14:14
Download | New Post | Modify | Diff | Diff | Hide line numbers
  1. import java.util.Vector;
  2.  
  3. public class vectors {
  4.  
  5.     /**
  6.      * @param args
  7.      */
  8.     public static void main([] args) {
  9.         v = new ();
  10.         v.add("TestA");
  11.         v.add("TestB");
  12.         v.add("TestC");
  13.         //does not compile without conversion
  14.         //String back = v.get(1);
  15.         back = () v.get(1);
  16.         .out.println(back);
  17.        
  18.         //does not compile
  19.         //String[] list = v.toArray();
  20.         //compiles, but doesnt run
  21.         //String[] list = (String []) v.toArray();
  22.     }
  23. }

PermaLink to this entry https://pastebin.co.uk/11161

The following amendments have been posted:

  1. Anonymous (Wed 28th Feb 2007 14:38)
Posted by Anonymous Wed 28th Feb 2007 14:18 - Syntax is Java - 34 views
Modification of posting from Anonymous Wed 28th Feb 2007 14:14
Download | New Post | Modify | Diff | Diff | Hide line numbers

 

Comments: 0