Convert Array to Vector in Java


package com.test;

import java.util.Arrays;
import java.util.Vector;

public class ArrayTest {

public static void main(String[] args) {
ArrayTest arrayTest = new ArrayTest();
arrayTest.arrayToVector();
}
public void arrayToVector() {

String[] arrayToConvert = { “jhony”, “peter”, “don” };

Vector<String> convertedVector = new Vector<String> Arrays.asList(arrayToConvert));

System.out.println(“11111 ” + convertedVector.get(0));

System.out.println(“3” + convertedVector.size());
}
}

Advertisements
About

I born in Good cultural place called India. My family is traditional family. We fallow all Indian traditions.

Tagged with: , ,
Posted in JAVA
4 comments on “Convert Array to Vector in Java
  1. interesting , I have bookmarked this post , so if i find a problem i can come here

  2. […] Convert Array to Vector in Java […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 678 other followers

Calendar
December 2012
M T W T F S S
« Nov   Jan »
 12
3456789
10111213141516
17181920212223
24252627282930
31  
Mallikarjun Gunda

This is Mallikarjun Gunda, I am working as a software professional. Blogging is my Passion. This blog contains the posts on Java related technologies and programming languages. I am happy to share my knowledge through the blogs.

Blog Stats
  • 265,564 hits
IndiBlogger
malliktalksjava.wordpress.c...
70/100