ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
What is an array and a vector? How they different from each 
other?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is an array and a vector? How they different from each other?
Answer
# 1
An array represents a contiguous block of memory where
objects are stored and accessed via a 0-based index value.
Arrays are usually fixed size once they are created.

A java.util.Vector is an implementation of a resizable
array. It has similar functionality as an array but also
gives the advantage of resizability when u try to add
elements to it exceeding its initial size.

The problem is that Vectors are synchronized which is not
necessary for many purposes and this may bring down
performance. Hence the use of ArrayList over Vecotor is
recommended. An ArrayList provides the same functionality of
a Vector, except tat it is not synchronized.
 
Is This Answer Correct ?    1 Yes 0 No
Ranganathkini
 
  Re: What is an array and a vector? How they different from each other?
Answer
# 2
Arrays group values and permit fast access by numeric 
index. Vectors are a variant of arrays that also permit 
fast access by numeric index.

They differ from each other in this way.
vector can grow and shrink dynamically where as array 
cannot.

vectors can be synchronised where as arrays cannot be.

vecotrs are implemented from list interface where as arrays 
are primitive datatypes.
 
Is This Answer Correct ?    0 Yes 0 No
Manjusinga
 
 
 
  Re: What is an array and a vector? How they different from each other?
Answer
# 3
arrays have elements of same datatypes, but vector can have 
elements of any types.
 
Is This Answer Correct ?    0 Yes 0 No
Prabir Kumar
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is data abstraction? Elaborate with example? BMC3
what is the use of declaring constructor as private? Sai-Softech3
What is the default initialized value of String type variable?  3
why the equals method can be override?when we override the equals method?  4
What is the diff. b/w Interfaces & Abstract class? Ericsson4
garbate collector(GC)?  4
what us Dyna action form? Aithent-Technologies3
What is cloneable interface?  5
What are the types of statement? explain SysBiz1
if arraylist size is increased from initial size what is the size of arraylist...suppose initial is 100 , if i add 101 element what is the size...  6
What is the difference between pageContext and page implicit objects in jsp? Merrill-Lynch6
what is inner class? HCL5
What is the difference between DataInputStream and BufferedReader  1
What is the protocol is used in type4 driver? CMC2
How do u provide security in java  1
transaction attributes ?  2
I have a class which is abstract which contains only the abstract methods. This is similar to an interface. Then, if i have given a choice to choose one of them. Which one i have to choose and why?  4
Hi Friends, Can u give few interview questions which relates ArrayList and Hashmap. I mean how to link ArrayList and HashMap.I know this is not good way of asking questions like this , but i need Microsoft1
Name the methods that used to get and set the text label displayed by a Buttonobject?  1
what is auto boxing UHG1
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com