Consider a class ClassName whose methods are listed below. What class is it?

ClassName(){...}
boolean isEmpty(){...}
void display(){...}
boolean search(int x){...}
void insert(int i){...}
void remove(int x){...}

Respuesta :

Answer:

An implementation of java.util.List interface

Explanation:

Given class consists of the following constructs:

  • Constructor
  • isEmpty,search, display
  • insert,remove

It supports inserting and removing an element at a specified index. It also supports search and display operations.

These are characteristics of an object which implements the java.util.List interface ( For example: ArrayList or user-defined customList ).