Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is an array and a vector? How they different from each
other?

Answer Posted / ranganathkini

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is treemap in java?

898


In java, how many ways you can take input from the console?

930


What is percentage in java?

955


what are the methods in object?

1085


What is an error in java?

1092


How do you use wildcards?

982


Which eclipse is best for java?

957


What is a constructor, constructor overloading in java?

959


What do you mean by stream pipelining in java 8?

1155


Differece between class and generic class?

977


What is the parse method in java?

1050


Is java still necessary?

1003


what is meant by abstract class?

1060


How do you clear a method in java?

954


Define linked list and its features with signature?

932