Assistant Programmer 2016 [MCQ]

76. Which keyword must be used to inherit a class in Java?

[Assistant Programmer 2016 [MCQ] : 2016]

1. extends

1

2. super

2

3. this

3

4. extent

4
Answer
77. Which of the following is the destructor for the class "Vehicle"

[Assistant Programmer 2016 [MCQ] : 2016]

1. *Vehicle()

1

2. *Vehicle(int value)

2

3. ~Vehicle()

3

4. ~ Vehicle(intvalue)

4
Answer
78. Using setter and getter method is known as

[Assistant Programmer 2016 [MCQ] : 2016]

1. encapsulation

1

2. polymorphism

2

3. inheritance

3

4. recursion

4
Answer
79. Which one is the most suitable for implementing a priority queue?

[Assistant Programmer 2016 [MCQ] : 2016]

1. Dequeue (double ended queue)

1

2. Heape

2

3. Queue

3

4. Array

4
Answer
80. What is the value of "d" after this line of code has been executed? double d = Math.round (2.5 + Math.random() );

[Assistant Programmer 2016 [MCQ] : 2016]

1. 2

1

2. 2.5

2

3. 3

3

4. 4

4
Answer