A Java ____ specifies the set of methods available to clients of a class.

A. interface
B. alias
C. variable
D. exception

Answer: A

Computer Science & Information Technology

You might also like to view...

Which of the following sets of statements creates a multidimensional array with 3 rows, where the first row contains 1 value, the second row contains 4 items and the final row contains 2 items?

a.``` int[][] items; items = new int[3][?]; items[0] = new int[1]; items[1] = new int[4]; items[2] = new int[2]; ``` b.``` int[][] items; items = new int[3][]; items[0] = new int[1]; items[1] = new int[4]; items[2] = new int[2]; ``` c.``` int[][] items; items = new int[?][?]; items[0] = new int[1]; items[1] = new int[4]; items[2] = new int[2]; ``` d.``` int[][] items; items[0] = new int[1]; items[1] = new int[4]; items[2] = new int[2]; ```

Computer Science & Information Technology

Which of the following statements is false?

a. An advantage of inheritance over interfaces is that only inheritance provides the is-a relationship. b. Objects of any subclass of a class that implements an interface can also be thought of as objects of that interface type. c. When a method parameter is declared with a subclass or interface type, the method processes the object passed as an argument polymorphically. d. All objects have the methods of class Object.

Computer Science & Information Technology