.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> OOPS >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Using java vector to store data

Posted By:laptop charles       Posted Date: July 17, 2010    Points: 10    Category: OOPS    URL: http://www.dotnetspark.com  

To store a data and retrieve the data.
 

It can used the vector class to store the data and get that data.
import java.util.*;
class vec2
{
	public static void main(String args[])
	{
	Vector v=new Vector();
	v.addElement("1");
	v.addElement("2");
	v.addElement("3");
	
	v.addElement("charles");
	v.addElement("mca");
	
	
	v.removeElementAt(1);
	v.insertElementAt("jesus",1);
		
		System.out.println(v.size());
		for(int i=0;i

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend