Your program has some error i.e

nextInt() is not a static method.we cant call it directly with class name .
Try It.
Random r=new Random();
Vector<String> v = new Vector<String>(10, 5);...