What is an Application Programming Interface (API) ? Why is it useful?

What will be an ideal response?


A collection of preexisting software that is part of the run-time library of your Java installation. It contains predefined classes and methods for commonly used data structures and operations so that you do not have to reinvent the wheel.

Computer Science & Information Technology

You might also like to view...

Alice uses ____ to surround an index number of an array.

A. square brackets B. curly braces C. asterisks D. arrows

Computer Science & Information Technology

In the HashTable functions, we had to make sure the client’s hash function did not produce an index outside of the array; yet, we didn’t need a size variable as a private member of HashTable because:

A. the client knows what size the hash table is B. the Array used for the hash table has a length function C. if the hash function is faulty, the index produced must be less than 0 D. we require that the client thoroughly test the hash function

Computer Science & Information Technology

The method paint has one parameter of type:

(a) Shape (b) Graphics (c) Image (d) String

Computer Science & Information Technology

Suppose ArrayList x contains two strings [Beijing, Singapore]. Which of the following method will cause runtime errors?

a. x.get(1) b. x.set(2, "New York"); c. x.get(2) d. x.remove(2) e. x.size()

Computer Science & Information Technology