What is the difference between a vector and an Array? (Java)

Answer Posted / shiv

Array is not synchronized

Vector is synchronized class

By default array are type safe

To make a vector class type safe we need to implement
generics

Once Array size defined it will be fixed for the rest of
its life

Vector can grow dynamically


Array pass no instance of test with Collection interface

Vector pass as it extends List which is a sub class of
Collection.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain view?

794


In Oracle Clinical 4.5.0, can the VIEW_TEMPLATE_ID column in DATA_EXTRACT_VIEWS table contain NULL value?

2110


What is the usage of synonyms?

810


How to start an oracle instance?

767


Explain the truncate in oracle?

719


Explain the use of compress option in exp command.

738


How to use "startup" command to start default instance?

731


What do you mean by a deadlock?

733


Differentiate between pre-select and pre-query?

822


Explain coalesce function?

833


How to define an oracle cursor variable?

763


How to best split csv strings in oracle 9i?

789


Explain the difference between sap and oracle?

770


Point out the difference between user tables and data dictionary?

747


How to list all tables in your schema?

779