Skip to content

Commit

Permalink
✨ Added Vector Java Program
Browse files Browse the repository at this point in the history
  • Loading branch information
KeyulJain committed Oct 20, 2020
1 parent 4e65a21 commit 879274d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Vector/vec1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import java.util.*;
class vec1{
public static void main(String args[]){
Vector v = new Vector();
for(int i=0;i<args.length;i++){
v.add(args[i]);
}
int size=v.size();
String str[]= new String[size];
v.copyInto(str);
for(int i=0;i<size;i++) {
System.out.println ("Element of Vector at position "+i+" : "+str[i]);
}
}
}

0 comments on commit 879274d

Please sign in to comment.