Difference between Array and vector?

Answer Posted / mandip

Ans 1: vector can store hetrogeneous data element,where
as array can stote homogeneous data element.

Ans 2: vector are store non-primitive type data element,
where as array can store primitive type data element.

Ans 3: wrapper classes are used in vector,where as in array
wrapper classes are not used.

Is This Answer Correct ?    17 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

606


For ease of programming you can consider the maze as a 2D array with colors represented by below integer and characters (in capital letters). • B - Black • W -White • G- Green • R- Red R B W B W W W W W W B W B B W W W W W W W B W B W W W B W W W W B B W W W B W W W B W W B B B B W B W B W W B W W W B W W W B B B W W B W W W B W W B W B W W W B W B W W W W B B W W W W B W W W W W G Shortest Route Problem: • Solution that finds the shortest Route between Red and Green  White will have 1 Weight.  Red and Green carry no weights.  Shortest path is the path with less weight when you add up the weights in the path.

1577


What is finally in Java?

572


What is the arraylist in java?

522


What are voids?

528






How do you declare a string variable?

508


What do you mean by a JVM?

557


What is nextline method in java?

551


What are the different types of garbage collectors in java?

540


What is command line argument

701


What is the difference between processes and threads?

529


What are filterstreams?

603


What are alternatives to java serialization?

595


How many types of threads are there in java?

497


What is singleton class in java and how can we make a class singleton?

562