Abstract Classes and Implementing Interfaces
Abstract Classes and Implementing Interfaces
Questions
Question 1 Multiple Choice (Single Answer)
The class String is defined in the package ___________.
- java.awt
- java.lang
- java.math
- java.net
Question 2 Multiple Choice (Single Answer)
Which of the following interfaces enables you to work with a group of objects?
- Collection
- List
- Set
- SortedSet
- SecurityManager
Question 3 Multiple Choice (Single Answer)
An abstract class cannot be _____________ in Java.
- declared
- defined
- instantiated
- inherited
Question 4 Multiple Choice (Single Answer)
The method within the abstract class must be _________.
- static
- final
- constant
- abstract
Question 5 Multiple Choice (Single Answer)
Which of the following is not an interface of Java Collection Framework?
- Set
- List
- Queue
- HashSet
Question 6 Multiple Choice (Single Answer)
Which of the following classes offers all the benefits of an array with the properties of the List interface?
- LinkedList
- ArrayList
- TreeSet
- HashMap
Question 7 Multiple Choice (Single Answer)
Which of the following is false regarding interface in Java?
- An interface can have only abstract methods.
- Constructors cannot be present in an interface.
- An interface can have instance variables.
- An interface cannot have static methods.
- A class can implement multiple interfaces.
Question 8 Multiple Choice (Single Answer)
Which of the following interfaces in java.beans package allows designers to change and display property value?
- DesignMode
- PropertyChangeListener
- PropertyEditor
- Visibility
- BeanInfo
Question 9 Multiple Choice (Single Answer)
In Java _________ is a interface.
- Map
- HashMap
- HashTable
- Table
- Arrays