wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Sec BCD 14-7-2023 Quiz-1

Total questions: 134

Worksheet time: 1hrs 7mins

Name
Class
Date
1.

-Contains no duplicate elements.

-Can contain at most one Null value.

-Elements are not key-value pairs.

-Accessing an element can be almost as fast as performing a similar operation on an array.


Which of these classes provides the specified features?

a)

LinkedList

b)

TreeMap

c)

HashSet

d)

LinkedHashMap

e)

HashMap

2.

Which of the following statement about Set is true?

a)

A HashSet cannot have a null value.

b)

Set allows duplicate values.

c)

Set allows null values but only single occurrence.

d)

Set extends the Java.util.collection interface.

3.

-Entries are organized as key/value pairs.

-Duplicate entries replace old entries.

-Entries are sorted using a Comparator or the Comparable interface.

Which interface of the java.util package offers the specified behavior?

a)

List

b)

Map

c)

Set

d)

SortedSet

e)

SortedMap

4.
a)

{1=C, 2=JavaEE, 4=Python, 3=PHP}

b)

{1=C, 2=JavaSE, 3=Python, 4=PHP}

c)

{1=C, 2=JavaEE, 3=Python, 4=PHP}

d)

{1=C, 2=JavaSE,2=JavaEE, 3=Python, 4=PHP}

e)

NullPointerException

5.
a)

{null=null, a=null, b=JavaSE, c=PHP, d=Python}

b)

{a=null, b=JavaSE, c=PHP, d=Python}

c)

{b=JavaSE, c=PHP, d=Python}

d)

Compilation Fails

6.
a)

4

b)

5

c)

6

d)

12

7.

-Entries are not organized as key/value pairs.

-Duplicate entries are rejected.

Which interface of the java.util package offers the specified behavior?

a)

List

b)

Map

c)

Set

d)

None of the above

8.
a)

[Computer, Network, Networks, Programming, Security]

b)

[Computer, Programming, Network, Networks, Programming, Security]

c)

[Computer, Programming, Computer, Networks, Network, Security]

d)

[Computer, Networks, Network, Programming, Security]

9.

List listNames = new ArrayList();

listNames.add("Tom");

listNames.add("Mary");

listNames.add("Peter");


String name2 = (String) listNames.get(1);

System.out.println(name2);

What is the output of the above code

a)

Tom

b)

Mary

c)

Peter

d)

raises Exception

10.

What is Collection in Java?

a)

A group of objects

b)

A group of classes

c)

A group of interfaces

d)

None of the mentioned

11.

Which of these interface is not part of Java’s collection framework?

a)

List

b)

Sorted List

c)

Set

d)

Sorted Map

12.

 What will be the output of the  Java program?

a)

{0, 1, 3, 4}

b)

{0, 1, 2, 4}

c)

{0, 1, 2, 3, 4}

d)

{0, 0, 0, 3, 4}

13.

Which of these return type of hasNext() method of an iterator?

a)

Integer

b)

Double

c)

Boolean

d)

Collections Object

14.

Which of these methods deletes all the elements from invoking collection?

a)

clear();

b)

reset();

c)

delete();

d)

remove();

15.

Which of the following statements are true with respect to sets as objects of Hashset?

a)

Set is always an ordered group of objects.

b)

Set allows duplicate objects.

c)

Set does not allow duplicate objects.

d)

Set supports iterators.

16.

Which of the following statements are correct in relation to collections in Java?

a)

A collection can have objects of different types in it.

b)

The Collection is a class.

c)

A collection can have only one type of object in it.

d)

A collection is same as a standard array.

17.

Which of the following interfaces declares a core method that all collections will have?

a)

EventListener

b)

Comparator

c)

Set

d)

Collection

18.

Which of the following statements are correct with respect to a Map in Java?

a)

A map can have iterators for accessing its elements.

b)

The elements of a map are accessed by the respective keys.

c)

Maps are the same as a SortedSet.

d)

None of these.

19.

Which of the following interfaces are not a part of the Java's Collection Framework?

a)

SortedList

b)

Set

c)

SortedMap

d)

List

20.

Which of the following statements are correct with respect to a List in Java?

a)

A List is implemented in the "first-in, first-out" (FIFO) order.

b)

A List is implemented in the "first-in, last-out" (FILO) order.

c)

Lists support duplicate items.

d)

None of these.

21.

Which of the following interfaces must contain a unique element?

a)

List

b)

Set

c)

Array

d)

Collection

22.

Which of the following method deletes all the elements from invoking (calling) collections?

a)

reset()

b)

clear()

c)

delete()

d)

refresh()

23.

Which of the following statements are true with respect to a stack?

a)

A Stack is implemented in the "first-in, first-out" (FIFO) order.

b)

A Stack is implemented in the "first-in, last-out" (FILO) order.

c)

A Stack supports random access.

d)

None of these.

24.

Which of the following classes implement the Queue interface?

a)

HashSet

b)

TreeSet

c)

LinkedList

d)

None of these

25.

What is Collection in Java?

a)

A group of objects

b)

A group of classes

c)

A group of interfaces

d)

None of the mentioned

26.

Which of these interface is not part of Java’s collection framework?

a)

List

b)

Sorted List

c)

Set

d)

Sorted Map

27.

 What will be the output of the  Java program?

a)

{0, 1, 3, 4}

b)

{0, 1, 2, 4}

c)

{0, 1, 2, 3, 4}

d)

{0, 0, 0, 3, 4}

28.

Which of these return type of hasNext() method of an iterator?

a)

Integer

b)

Double

c)

Boolean

d)

Collections Object

29.

Which of these exceptions is thrown by remover() method?

a)

IOException

b)

SystemException

c)

ObjectNotFoundExeception

d)

IllegalStateException

30.

Which of these methods deletes all the elements from invoking collection?

a)

clear();

b)

reset();

c)

delete();

d)

remove();

31.

Which of these interface declares core method that all collections will have?

a)

Collection

b)

EventListner

c)

Comparator

d)

Set

e)

List

32.

Which of these is an incorrect form of using method max() to obtain maximum element?

a)

max(Collection c)

b)

max(Collection c, Comparator comp)

c)

max(Comparator comp)

d)

max(List c)

33.

Which of these methods can convert an object into a List?

a)

SetList()

b)

ConvertList()

c)

CopyList()

d)

singletonList()

34.

Which of these is true about unmodifiableCollection() method?

a)

unmodifiableCollection() returns a collection that cannot be modified.

b)

unmodifiableCollection() method is available only for List and Set.

c)

unmodifiableCollection() is defined in Collection class.

d)

None of the mentioned.

35.

Which of these is static variable defined in Collections?

a)

EMPTY_SET

b)

EMPTY_LIST

c)

EMPTY_MAP

d)

All of the mentioned

36.

What implementation of Iterator can traverse a collection in both directions?

a)

Iterator

b)

ListIterator

c)

SetIterator

d)

MapIterator

37.

Which is faster and uses less memory?

a)

ListEnumeration

b)

Iterator

c)

Enumeration

d)

ListIterator

38.

What will be output of given code

a)

a followed by concurrentModification Exception

b)

a b c

c)

a b

d)

a c

39.

Which interface does java.util.Hashtable implement?

a)

Java.util.Map

b)

Java.util.List

c)

Java.util.HashTable

d)

Java.util.Collection

40.

You need to store elements in a collection that guarantees that no duplicates are stored and all elements can be accessed in natural order.

Which interface provides that capability?

a)

java.util.Map

b)

java.util.Set

c)

java.util.List

d)

java.util.Collection

41.

You need to store elements in a collection that guarantees that no duplicates are stored and all elements can be accessed in natural order.

Which interface provides that capability?

a)

java.util.Map

b)

java.util.Set

c)

java.util.List

d)

java.util.Collection

42.

Which collection class allows you to grow or shrink its size and provides indexed access to its elements, but whose methods are not synchronized?

a)

java.util.HashSet

b)

java.util.LinkedHashSet

c)

java.util.List

d)

java.util.ArrayList

43.

The default capacity of a Vector is:

a)

10

b)

12

c)

8

d)

0

44.

The Comparable interface contains which called?

a)

toCompare

b)

compare

c)

compareTo

d)

compareWith

45.

Find the output

public class TreeMapTest {

public static void main(String args[]) {

Map<Integer, String> m = new TreeMap<Integer, String>();

m.put(11, "audi");

m.put(null, null);

m.put(11, "bmw");

m.put(null, "ferrari");

System.out.println(m.size());

System.out.println(m);

}

a)

Nullpointer exception

b)

compiler error

c)

2

d)

Null value

46.

public class MyClass {

public static void main(String args[]) {

Map<String, String> hashMap = new HashMap<String, String>();

hashMap.put(new String("a"), "audi");

hashMap.put(new String("a"), "ferrari");

System.out.println(hashMap);

}

}

a)

a=audi

b)

a=audi

a=ferrari

c)

a=ferrari

d)

Run time Error

47.

Deque and Queue are derived from

a)

Abstract class

b)

Collection

c)

Abstactcollection

d)

List

48.

What will be output of given code

a)

1 2 3

b)

1 followed by exception

c)

Compile time error

d)

run time error

49.

Which is best suited to a multi-threaded environment?

a)

WeakHashMap

b)

Hashtable

c)

HashMap

d)

ConcurrentHashMap

50.

TreeMap implements?

a)

Dictionary

b)

HashMap

c)

AbstractMap

d)

NavigableMap

51.

Which of these is synchronized?

a)

TreeMap

b)

HashMap

c)

Hashtable

d)

All of the above

52.

TreeMap

a)

doesn't allow null key

b)

allow many null values

c)

Both

d)

allow many null key

53.

How can you sort given HashMap on basis of values

a)

Implement Comparator interface and override its compare method

b)

It is not possible

c)

Implement Comparator interface and override its compareTo method

d)

Implement Comparator interface and override its comparable method

54.

What does Collections.sort internally uses when number of elements are less than 7?

a)

Insertion sort

b)

Merge sort

c)

Quick sort

d)

None

55.

What does Collections.sort internally uses when number of elements are greater than 7?

a)

Insertion sort

b)

Merge sort

c)

Quick sort

d)

None

56.

Which of these packages contain all the collection classes?

a)

java.lang

b)

java.util

c)

java.net

d)

java.awt

57.

Which of these classes is not part of Java’s collection framework?

a)

Maps

b)

Array

c)

Stack

d)

Queue

58.

Which of these methods deletes all the elements from invoking collection?

a)

clear()

b)

reset()

c)

delete()

d)

refresh()

59.

What will be the output of the following Java program?


import java.util.*;

class Array {

public static void main(String args[]) {

int array[] = new int [5];

for (int i = 5; i > 0; i--)

array[5-i] = i;

Arrays.fill(array, 1, 4, 8);

for (int i = 0; i < 5 ; i++) System.out.print(array[i]);

} }

a)

12885

b)

12845

c)

58881

d)

54881

60.

What will be the output of the following Java program?

import java.util.*;

class Bitset {

public static void main(String args[]) {

BitSet obj = new BitSet(5);

for (int i = 0; i < 5; ++i)

obj.set(i);

obj.clear(2);

System.out.print(obj);

} }

a)

{0, 1, 3, 4}

b)

{0, 1, 2, 4}

c)

{0, 1, 2, 3, 4}

d)

{0, 0, 0, 3, 4}

61.

Which collection class allows you to grow or shrink its size and provides indexed access to its elements, but whose methods are not synchronized?

a)

java.util.HashSet

b)

java.util.LinkedHashSet

c)

java.util.List

d)

java.util.ArrayList

62.

You need to store elements in a collection that guarantees that no duplicates are stored and all elements can be accessed in natural order. Which interface provides that capability?

a)

java.util.Map

b)

java.util.Set

c)

java.util.List

d)

java.util.Collection

63.

What will be the output of the program?


TreeSet map = new TreeSet();

map.add("one");

map.add("two");

map.add("three");

map.add("four");

map.add("one");

Iterator it = map.iterator();

while (it.hasNext() )

{

System.out.print( it.next() + " " );

}

a)

one two three four

b)

four three two one

c)

four one three two

d)

one two three four one

64.

What will be the output of the program?package foo;

import java.util.Vector; /* Line 2 */

private class MyVector extends Vector

{

int i = 1; /* Line 5 */

public MyVector()

{

i = 2;

}

}

public class MyNewVector extends MyVector

{

public MyNewVector ()

{

i = 4; /* Line 15 */

}

public static void main (String args [])

{

MyVector v = new MyNewVector(); /* Line 19 */

}

}

a)

Compilation will succeed.

b)

Compilation will fail at line 3.

c)

Compilation will fail at line 5.

d)

Compilation will fail at line 15.

65.

What will be the output of the program?

import java.util.*;

class I

{

public static void main (String[] args)

{

Object i = new ArrayList().iterator();

System.out.print((i instanceof List)+",");

System.out.print((i instanceof Iterator)+",");

System.out.print(i instanceof ListIterator);

}

}

a)

Prints: false, false, false

b)

Prints: false, false, true

c)

Prints: false, true, false

d)

Prints: false, true, true

66.

-Contains no duplicate elements.

-Can contain at most one Null value.

-Elements are not key-value pairs.

-Accessing an element can be almost as fast as performing a similar operation on an array.


Which of these classes provides the specified features?

a)

LinkedList

b)

TreeMap

c)

HashSet

d)

LinkedHashMap

e)

HashMap

67.

Which of the following statements are true with respect to sets as objects of Hashset?

a)

Set is always an ordered group of objects.

b)

Set allows duplicate objects.

c)

Set does not allow duplicate objects.

d)

Set supports iterators.

68.

Which of the following interfaces declares a core method that all collections will have?

a)

EventListener

b)

Comparator

c)

Set

d)

Collection

69.

Which of the following statements are correct with respect to a Map in Java?

a)

A map can have iterators for accessing its elements.

b)

The elements of a map are accessed by the respective keys.

c)

Maps are the same as a SortedSet.

d)

None of these.

70.

Which of the following interfaces must contain a unique element?

a)

List

b)

Set

c)

Array

d)

Collection

71.

Which of the following statements are correct with respect to a List in Java?

a)

A List is implemented in the "first-in, first-out" (FIFO) order.

b)

A List is implemented in the "first-in, last-out" (FILO) order.

c)

Lists support duplicate items.

d)

None of these.

72.

We need to access elements frequently by using index...

Which one is better solution?

a)

Set

b)

List

c)

Map

73.

We want store data in form Key and Value... Whic one is better solution?

a)

Set

b)

List

c)

Map

74.

We want to create collection of unique elements without duplicates... Which one is better solution?

a)

Set

b)

List

c)

Map

75.

Contains no duplicate elements

Elements are not key-value pairs

Always unique elements

a)

LinkedList

b)

TreeMap

c)

HashSet

d)

HashMap

76.

What does it mean for a list to be "dynamic" in ArrayList?

a)

You can easily add and remove elements

b)

It may contain multiple types of values

c)

It has a set size once it has been created

d)

You can access it from anywhere in the program

77.

Collection Framework Comes under which package?

a)

java.lang

b)

java.io

c)

java.util

d)

java.applet

78.

Which option is correct in the following collection interface hierarchy?

a)

List,Set,Queue

b)

List,Set,Map

c)

List,Map

d)

Map,Queue,Sey

79.
____ is the process of arranging a series of objects in some logical order.
a)
Passing
b)
Organizing
c)
Sorting
d)
Sending
80.

Which of the following statement about Set is true?

a)

A HashSet cannot have a null value.

b)

Set allows duplicate values.

c)

Set allows null values but only single occurrence.

d)

Set extends the Java.util.collection interface.

81.

Collection Framework Comes under which package?

a)

java.lang

b)

java.io

c)

java.util

d)

java.applet

82.

Which option is correct in the following collection interface hierarchy?

a)

List,Set,Queue

b)

List,Set,Map

c)

List,Map

d)

Map,Queue,Sey

83.

When to use Linked List

a)

To avoid Duplicates

b)

Random access

c)

For Fast Manipulation

d)

None of the above

84.

What is the list nums if it is initially [5, 3, 1] and the following code is executed?

nums.add(6);

nums.add(0, 4);

nums.remove(1);

a)

[4, 3, 6]

b)

[5, 3, 1, 6]

c)

[4, 3, 1, 6]

d)

[4, 5, 3, 6]

85.

Which statement below is the correct way to retrieve the first element in the nums ArrayList?

a)

nums.get(0)

b)

nums[0]

c)

nums(0)

d)

nums[1]

86.

Each time you create a string literal, the JVM checks the ___ first

a)

"String constant

pool"

b)

"String contiguos

pool"

c)

"Constant

pool"

d)

"String reference

pool"

87.

The ___ in Java is a framework that provides an architecture

to store and manipulate the group of objects

a)

List

b)

Collection

c)

Array

d)

Graph

88.

String objects are ____ where as StringBuffer class is ____

a)

immutable,

immutable

b)

mutable,

immutable

c)

immutable,

mutable

d)

mutable,

mutable

89.

The java string charAt() method returns

a)

a char value at the 0th index

b)

print charAt

c)

print the index

d)

a char value at the given

index number.

90.

There are two ways to create String object:

String s = "welcome";

This is an example of creating an object

a)

By string literal

b)

By new keyword

c)

By Welcome keyword

d)

By Welcome keyword

91.

String s1="Java";

String s2="Java";

• In the above example, how many object will be created.

a)

1

b)

2

c)

3

d)

4

92.

What will be the output of the program ?

a)

0, 19

b)

10, 10

c)

10, 0

d)

19,19

93.

There are three ways to compare string in java. They

a)

1.equals() method

2. = = operator

3.compareTo() method

b)

1. StrCompare

2. Equals

3. = operator

c)

1. = operator

2. == orperator

3. Equals operator

d)

1. = operator

2. comp operatoe

3. == operator

94.

" = " operator and "==" operator is different. = operator is used to assign value where as == is used to___

a)

compares values

b)

compares references

c)

save values

d)

concatenate values

95.

Wrong statement regarding contains() method is

a)

Searches the sequence of

characters in this string.

b)

It returns true if sequence of char values are found

c)

Searches case sensitive char sequence

d)

Not case sensitive char sequence

96.

The java string charAt() method returns ___if given index number

is greater than or equal to this string length or a negative number

a)

StringIndexOutOfBoundsException

b)

OutOfBoundsException

c)

No Exception

d)

StringException

97.

What will be the output after concatenation performed ?

a)

Sachin

b)

Tendulkar

c)

Sachin Tendulkar

d)

Tendulkar Sachin

98.

Which is wrong ?????

1 • Java ArrayList class can't contain duplicate elements.

2 • Java ArrayList class maintains insertion order.

3 • Java ArrayList allows random access because array works at the index basis.

4 • In ArrayList, manipulation is little bit slower than the LinkedList in

Java because a lot of shifting needs to occur if any element is

removed from the array list.

a)

1

b)

2

c)

3

d)

4

99.

The events can be broadly classified into two categories. They are

a)

Foreground event

Background event

b)

Topdown event

Bottum up event

c)

Simple event

Complex event

d)

Public event

Private event

100.

The model defines the standard mechanism to generate and

handle the events is called ?

a)

Delightful Event Model

b)

Depletion Event Model

c)

Delegation Event Model

d)

Dedicated Event Model

101.

A ____ program contains two or more parts that can run

concurrently and each part can handle a different task at the same

time making optimal use of the available resources specially when

your computer has multiple CPUs

a)

multi-threaded

b)

multi- programmed

c)

multi-processing

d)

multi-tasking

102.

Threads are ___and ___processes within a process.

a)

Dependent,

Havy wieght

b)

Independent,

lightweight

c)

Dependent,

Loosly weight

d)

Independent,

Tightly weight

103.

A thread can be in one of the five states..Which is not a state given below

1. New

2. Runnable

3. Running

4. Suspend

5. Terminated

a)

2

b)

3

c)

4

d)

5

104.

What is the state of the Thread that waits to acquire the lock

of an object.

a)

Sleeping

b)

Blocked for I/O

c)

Waiting for notification

d)

Blocked for lock acquisition

105.

The most two important methods in Java Multithreading concept are

a)

Start()

run()

b)

Start()

stop()

c)

run()

resume()

d)

run()

resolve()

106.

The resume() method of thread class is only used with___method

a)

The stop() method

b)

The suspend() method

c)

Run() Method

d)

Synchronized method

107.

Which method is used here to give new Names to the thread

a)

run()

b)

getName()

c)

start()

d)

setName()

108.

Which of these packages contain all the collection classes?

a)

java.lang

b)

java.util

c)

java.net

d)

java.awt

109.

Which of these classes is not part of Java’s collection framework?

a)

Maps

b)

Array

c)

Stack

d)

Queue

110.

Which of this interface is not a part of Java’s collection framework?

a)

List

b)

Set

c)

SortedMap

d)

SortedList

111.

Which of these methods deletes all the elements from invoking collection?

a)

clear()

b)

reset()

c)

delete()

d)

refresh()

112.

What is Collection in Java?

a)

A group of objects

b)

A group of classes

c)

A group of interfaces

d)

None of the mentioned

113.

What will be the output of the following Java program?

  1. import java.util.*;
  2. class Array

  3. {

  4. public static void main(String args[])

  5. {

  6. int array[] = new int [5];

  7. for (int i = 5; i > 0; i--)

  8. array[5-i] = i;

  9. Arrays.fill(array, 1, 4, 8);

  10. for (int i = 0; i < 5 ; i++)

  11. System.out.print(array[i]);

  12. }

  13. }

a)

12885

b)

12845

c)

58881

d)

54881

114.

What will be the output of the following Java program?

  1. import java.util.*;
  2. class Bitset

  3. {

  4. public static void main(String args[])

  5. {

  6. BitSet obj = new BitSet(5);

  7. for (int i = 0; i < 5; ++i)

  8. obj.set(i);

  9. obj.clear(2);

  10. System.out.print(obj);

  11. }

  12. }

a)

{0, 1, 3, 4}

b)

{0, 1, 2, 4}

c)

{0, 1, 2, 3, 4}

d)

{0, 0, 0, 3, 4}

115.

Which of these return type of hasNext() method of an iterator?

a)

Integer

b)

Double

c)

Boolean

d)

Collections Object

116.

Which of these methods is used to obtain an iterator to the start of collection?

a)

start()

b)

begin()

c)

iteratorSet()

d)

iterator()

117.

Which of these methods can be used to move to next element in a collection?

a)

next()

b)

move()

c)

shuffle()

d)

hasNext()

118.

Which of these iterators can be used only with List?

a)

Setiterator

b)

ListIterator

c)

Literator

d)

None of the mentioned

119.

Which of these is a method of ListIterator used to obtain index of previous element?

a)

previous()

b)

previousIndex()

c)

back()

d)

goBack()

120.

What will be the output of the following Java program?

  1. import java.util.*;
  2. class Collection_iterators

  3. {

  4. public static void main(String args[])

  5. {

  6. LinkedList list = new LinkedList();

  7. list.add(new Integer(2));

  8. list.add(new Integer(8));

  9. list.add(new Integer(5));

  10. list.add(new Integer(1));

  11. Iterator i = list.iterator();

  12. Collections.reverse(list);

  13. while(i.hasNext())

  14. System.out.print(i.next() + " ");

  15. }

  16. }

a)

2 8 5 1

b)

1 5 8 2

c)

2

d)

2 1 8 5

121.

What will be the output of the following Java program?

  1.   import java.util.*;
  2. class Collection_iterators

  3. {

  4. public static void main(String args[])

  5. {

  6. LinkedList list = new LinkedList();

  7. list.add(new Integer(2));

  8. list.add(new Integer(8));

  9. list.add(new Integer(5));

  10. list.add(new Integer(1));

  11. Iterator i = list.iterator();

  12. Collections.reverse(list);

  13. Collections.sort(list);

  14. while(i.hasNext())

  15. System.out.print(i.next() + " ");

  16. }

  17. }

a)

2 8 5 1

b)

1 5 8 2

c)

1 2 5 8

d)

2 1 8 5

122.

Which of these interfaces is not part of the collection framework in Java?

a)

Collection

b)

Set

c)

Group

d)

List

123.

Which interface does not allow duplicates elements?

a)

Set

b)

List

c)

Map

d)

All the answers are true

124.

Which of these collection classes has the ability to scale dynamically?

a)

Array

b)

Arrays

c)

ArrayList

d)

All the answers are true

125.

HashMap allows _____________

a)

null values

b)

null key

c)

All the answers are true

d)

None

126.
  1. The Comparable interface contains which called?

a)
  1. toCompare

b)
  1. compare

c)
  1. compareTo

d)
  1. compareWith

127.
  1. Which is faster and uses less memory?

a)
  1. ListEnumeration

b)
  1. Iterator

c)
  1. Enumeration

d)
  1. ListIterator

128.
  1. Which does NOT implement the Collection interface?

a)
  1. List

b)
  1. Map

c)
  1. Set

d)

None

129.


The default capacity of a ArrayList is:


a)

12

b)

16

c)

1

d)

10

130.
  1. Which provides better performance for the insertion and removal from the middle of the list?

a)
  1. Vector

b)
  1. ArrayList

c)
  1. LinkedList

d)

All

131.
  1. After resizing, size of ArrayList is increased by :

a)

200%

b)

50%

c)

100%

d)

Not Increase

132.
  1. After resizing, size of Vector is increased by:

a)

200%

b)

100%

c)

50%

d)

None

133.


he default capacity of a ArrayList is:


a)

12

b)

16

c)

1

d)

10

134.
  1. Which is faster and uses less memory?

a)
  1. ListEnumeration

b)
  1. Iterator

c)
  1. Enumeration

d)
  1. ListIterator