Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Interview-Questions what is diference between the vector and arraylist with realtime example

Have Programming Question? Ask it here!
 
 
 


pradeep
what is diference between the vector and arraylist with realtime example
1 Answer(s)      4 years and 4 months ago
Posted in : Java Interview Questions


what is diference between the vector and arraylist with realtime example

Advertisement
View Answers

March 18, 2010 at 11:14 AM


Hi Friend,

Difference between Vector and ArrayList:

1)Vector is synchronized therefore it is thread safe while
ArrayList is not.

2)Vector can increment the size by double while arraylist can increment it by 50%.

3)Vector is legacy class while ArrayList is newly added.

4)Default ArrayList capacity is 0 where as Vector intial
capacity is 10.

For more information, visit the following links:

http://www.roseindia.net/java/beginners/vectordemo.shtml
http://www.roseindia.net/java/beginners/array_list_demo.shtml

Thanks


Related Tutorials/Questions & Answers:
what is diference between the vector and arraylist with realtime example - Java Interview Questions
what is diference between the vector and arraylist with realtime example  what is diference between the vector and arraylist with realtime example  Hi Friend, Difference between Vector and ArrayList: 1)Vector
Diff between ArrayList and Vector?
Diff between ArrayList and Vector?  What's The Difference between ArrayList and Vector Classes and Can you give me a simple Program for set and List Interface
Advertisements
arraylist and vector
arraylist and vector  what is the diff b/w arraylist and vector
What is a vector in Java? Explain with example.
What is a vector in Java? Explain with example.  What is a vector in Java? Explain with example.   Hi, The Vector is a collect of Object... when required. There are 2 types of Vector i.e. synchronized and Vector contains
ArrayList and Vector
ArrayList and Vector  hello, Why ArrayList is faster than Vector?   hii, ArrayList is faster than Vector, because ArrayList is not synchronized. Synchronization will reduce the performance of Vector
vector and arraylist
vector and arraylist    suppose i have class A { public static arrylist a1(){} class B{ public static vector b1() {} } my question is how to class B method in Class A and how to get vector object values in class A without
arraylist vs vector - Java Beginners
arraylist vs vector  hi, i want to know what is the difference between arraylist and vector in case of performance. in what cases we should go for arraylist and in what case we should go for vector. is there any   array
Static Method in java with realtime Example
Static Method in java with realtime Example  could you please make me clear with Static Method in java with real-time Example
to use ArrayList in the place of Vector
(); is a return type of Enumeration, while using ArrayList what should i do...to use ArrayList in the place of Vector  public Enumeration getInterfaces() { ISCMetaType currentType = this; ArrayList
to use ArrayList in the place of Vector
(); is a return type of Enumeration, while using ArrayList what should i do...to use ArrayList in the place of Vector  public Enumeration getInterfaces() { ISCMetaType currentType = this; ArrayList
Vector Iterator Java Example
interface can traverse all its elements. Java Vector Iterator with Example import java.util.Iterator; import java.util.Vector; public class vector... Vector is a collection class.It works similar to the Array. It has
Threads in realtime projects
Threads in realtime projects  Explain where we use threads in realtime projects with example
J2ME Vector Example
J2ME Vector Example       This application illustrates how we can use Vector class. In this example we are using  the vector class in the canvas form. The vector class
Give difference between LinkedList and ArrayList - Java Beginners
Give difference between LinkedList and ArrayList  Hi, What is the use of LinkedList and ArrayList? How you can difference between LinkedList and ArrayList? Provide examples of each. Thanks   Hi Friend
Java : Vector Example
Java : Vector Example This segment of tutorial illustrates about the Vector class and its use with the Iterator interface. Java Vector : Vector class...(it.next()); } } } Description : In this example we are using vector to store
What is the difference between the >> and >>> operators?
What is the difference between the >> and >>> operators?   hi, What is the difference between the >> and >>> operators? Thanks
Collection : ArrayList Example
This tutorial contains description of Collection ArrayList with example
Java Vector
Java Vector In this tutorial, you will learn about vector and its' implementation with example. Vector is alike to ArrayList , it is also dynamic... In the below example, you will see vector and different methods implementation
Java ArrayList Example
Java ArrayList Example  How can we use array list in java program..."); array.add("Arun"); System.out.println("ArrayList Size...++){ System.out.println("ArrayList Element"+i+" :"+array.get(i
what is the difference between extends and implements
what is the difference between extends and implements  difference between extends and implements
what is the difference between extends and implements
what is the difference between extends and implements  difference between extends and implements
What are the differences between EJB and Spring
What are the differences between EJB and Spring   Hi, What are the differences between EJB and Spring Thanks
What is the difference between hibernate and spring
What is the difference between hibernate and spring  Hi, What is the difference between hibernate and spring. Thanks
what is the difference between pop and oop
what is the difference between pop and oop  what is the difference between pop and oop
what is the Difference between weblogic and jboss?
what is the Difference between weblogic and jboss?  what is the Difference between weblogic and jboss
What is the difference between $message and $$message?
What is the difference between $message and $$message?  What is the difference between $message and $$message
What is difference between a PROCEDURE & FUNCTION ?
What is difference between a PROCEDURE & FUNCTION ?  What is difference between a PROCEDURE & FUNCTION
What is the difference between PHP4 and PHP5?
What is the difference between PHP4 and PHP5?  What is the difference between PHP4 and PHP5
What is the difference between a constructor and a method?
What is the difference between a constructor and a method?  Hi, What is the difference between a constructor and a method?   Hi, I have found a good link of Java program related to difference between constructor
Collection : ArrayList Example
Collection : ArrayList Example This tutorial contains description of Collection ArrayList with example. ArrayList : For ArrayList<E> import... the element at the specified index from the Arraylist. Example : package
What is difference between the java and javascript?
What is difference between the java and javascript?  What is the difference beteen the java and javascript?   Hello Friend, Read Here Thanks
Hibernate Criteria Between Example
Hibernate Criteria Between Example  How to use the Between in the Hibernate Query? Share me good example code. Thanks   Example of Hibernate Criteria Between. Check the tutorial Hibernate Criteria Between. Check
Any Link Between ArrayList and HashMap - Java Interview Questions
Any Link Between ArrayList and HashMap  Hi Friends, Can u give few interview questions which relates ArrayList and Hashmap. I mean how to link ArrayList and HashMap. Thanks Prakash  Hi Friend, Similarities: 1
What is difference between Path and Classpath?
What is difference between Path and Classpath?   hi What is difference between Path and Classpath? thanks   Hi, The Path & Classpath are used for operating system level environment variales. We mostly use Path
What is the difference between a JDK and a JVM?
What is the difference between a JDK and a JVM?  Hi, What is the difference between a JDK and a JVM? Thanks,   Hi, JDK is stand... to compile your source files using a JVM. For more difference between JDK and JVM
What is difference between TRUNCATE & DELETE
What is difference between TRUNCATE & DELETE   What is difference between TRUNCATE & DELETE?   Hi, The DELETE command is used to remove rows from a table. A WHERE clause can be used to only remove some rows
What is difference between the java and javascript?
What is difference between the java and javascript?  What is the difference beteen the java and javascript?   Hello Friend, Difference: 1) Java is a Object Oriented programming language developed by Sun Microsystems
arraylist
arraylist   Using arraylist class , what type of exception are throws, how can write a java programe   An ArrayList can throw ArrayIndexOutOfBoundsException. Here is a example. import java.util.*; public class
What is the difference between IN and BETWEEN, that are used inside a WHERE clause?
What is the difference between IN and BETWEEN, that are used inside a WHERE clause?  What is the difference between IN and BETWEEN, that are used inside a WHERE clause?   Hi, The BETWEEN clause is used to fetch a range
what is the difference between distributed application and web application?
what is the difference between distributed application and web application?  what is the difference between distributed application and web application
What are the differences between require and include, include_once?
What are the differences between require and include, include_once?  What are the differences between require and include, include_once
What’s the difference between include and require?
What?s the difference between include and require?  What?s the difference between include and require
What are the difference between abstract class and interface?
What are the difference between abstract class and interface?  What are the difference between abstract class and interface
What is the difference between the functions unlink and unset?
What is the difference between the functions unlink and unset?  What is the difference between the functions unlink and unset
What is the difference between ereg_replace() and eregi_replace()?
What is the difference between ereg_replace() and eregi_replace()?  What is the difference between eregreplace() and eregireplace
What is the difference between JSF, Servlet and JSP?
What is the difference between JSF, Servlet and JSP?  What is the difference between JSF, Servlet and JSP
What is difference between singleton and prototype bean?
What is difference between singleton and prototype bean?  Hi, What is difference between singleton and prototype bean? Thanks
What’s the difference between load() and get()?
What?s the difference between load() and get()?   Hi, What?s the difference between load() and get()? thanks
what is difference between objectan primitive? - Java Beginners
what is difference between objectan primitive?  whatis difference between object and primitive
What is the difference between the Boolean & operator and the && operator?
What is the difference between the Boolean & operator and the && operator?   Hello, What is the difference between the Boolean & operator and the && operator? thanks
Advertisements
 

 

 

DMCA.com