5 years ago in Java Package And Interface

What is the output of this program?
import java.util.*;

class vector {

public static void main(String args[]) {

Vector obj = new Vector(4,2);

obj.addElement(new Integer(3));

obj.addElement(new Integer(2));

obj.addElement(new Integer(5));

obj.removeAll(obj);

System.out.println(obj.isEmpty());

}

}

[A] 0
[B] 1
[C] true
[D] false
Loading...
Next Question

Overall Stats

Attempted 142
Correct 59
Incorrect 31
Viewed 52

Answers

Guest
Guest
Mallinatha BJ - 9 months ago

Answer is true

bruh
bruh - 1 month ago

bruh from Guwahati, India is saying true is correct answer

Vaibhav Bisht
Vaibhav Bisht - 1 month ago

Vaibhav Bisht from Dehradun, India is saying true is correct answer

Assaad Amine
Assaad Amine - 1 month ago

Assaad Amine from Casablanca, Morocco is saying 0 is correct answer

ayoub benigmim
ayoub benigmim - 1 month ago

ayoub benigmim from Casablanca, Morocco is saying true is correct answer

Related Questions

Which of these can be used to fully abstract a class from its implementation?

  • [A] Objects
  • [B] Packages
  • [C] Interfaces
  • [D] None of the Mentioned.

Interfaces helps in which type of inheritance ?

  • [A] Multiple inheritance
  • [B] Multilevel inheritance
  • [C] Hierarchical inheritance
  • [D] None of above