Keywords
Algorithm Analysis
100

Used in the first line of all class declarations, whether concrete or abstract, subclass or superclass. The following example is the first line of code to declare a class:


public class Book

class
100

If found is a boolean variable whose value is true and if special is a boolean variable with value false, what will be returned by the following statement?

return found || special;

true

200

A private data type whose value is true or false. It can be used in declaration of a variable or as the return type of a method. 

boolean

200

If found is a boolean variable whose value is true and is special is boolean variable with value false, what will be returned by the following statement?

return found && special;

false

300

Used in the declaration of abstract classes and methods. For example:
public abstract class Shape{

abstract

300

If sum is an int variable whose value is 12 and if amount is a double variable with value 8, what will be returned by the following statement? 

return sum/amount;

1.5

400

Used in the declaration of a subclass to show its inheritance relationship with a superclass.

extends


400

If an array, arr, contains 100 int values, what does the following statement do?

int x - arr[100];

The statement throws an ArrayIndexOutOfBoundsException.

500

Used in the declaration of a final variable, namely, a variable whose value cannot be changed once it has been assigned. 

final

500

If sum is an int variable whose value is 100 and if amount is an int variable with value 0, what will be returned by the following statement?

return sum/amount;

An ArithmeticException will be thrown.

M
e
n
u