AP Computer Science Chapter 1 Terms

packages

In Java, related classes are grouped into _______.

import packagename.*;

To import all of the classes in a package called "packagename", use the form...

main method

A Java program must have at least one class, the one that contains the _______.

source files

The java files that comprise your program are called _______.

compiler, bytecode

A(n) _______ converts source code into machine-readable form called _______.

public, private

The keyword _______ signals that the class or method is usable outside of the class, while _______ data members or methods are not.

static

The keyword _______ is used for methods that will not access any objects of a class.

identifier

A(n) _______ is a name for a variable, parameter, constant, user-defined method, or user-defined class.

int

An _____; 2, -26, 3000

boolean

A ________. Just two values, true or false.

double

A _______ precision floating-point number; 2.718, -367189.42, 1.6e4

overflow error

If you try to store a value whose magnitude is too big in an int variable, you'll get an _______.

declaration

An identifier is introduced into a Java program with a _______ that declares its type.

double p = 2.3, q = 4.1;

Initialize variables "p" and "q" to 2.3 and 4.1 respectively.

2^7-1

What is the largest positive integer that can be stored using type byte?

0

0000 - in decimal

1

0001 - in decimal

2

0010 - in decimal

3

0011 - in decimal

4

0100 - in decimal

5

0101 - in decimal

6

0110 - in decimal

7

0111 - in decimal

8

1000 - in decimal

9

1001 - in decimal

A

1010 - in hexadecimal

B

1011 - in hexadecimal

C

1100 - in hexadecimal

D

1101 - in hexadecimal

E

1110 - in hexadecimal

F

1111 - in hexadecimal

NOT

!

AND

&&

OR

||

compound boolean expressions

Logical operators are applied to boolean expressions to form _______.

Escape sequence to print out a newline

\n

Escape sequence to print out a double quote

\

Escape sequence to print out a backslash

\\

system.out.println("Welcome to\na new line");

Print out the following statement:
Welcome to
a new line

for (initialization; termination condition; update statement)
{
statements
}

The general form of the "for" loop is...

exception

An _______ is an error condition that occurs during the execution of a Java program.

packages

In Java, related classes are grouped into _______.

import packagename.*;

To import all of the classes in a package called "packagename", use the form...

main method

A Java program must have at least one class, the one that contains the _______.

source files

The java files that comprise your program are called _______.

compiler, bytecode

A(n) _______ converts source code into machine-readable form called _______.

public, private

The keyword _______ signals that the class or method is usable outside of the class, while _______ data members or methods are not.

static

The keyword _______ is used for methods that will not access any objects of a class.

identifier

A(n) _______ is a name for a variable, parameter, constant, user-defined method, or user-defined class.

int

An _____; 2, -26, 3000

boolean

A ________. Just two values, true or false.

double

A _______ precision floating-point number; 2.718, -367189.42, 1.6e4

overflow error

If you try to store a value whose magnitude is too big in an int variable, you'll get an _______.

declaration

An identifier is introduced into a Java program with a _______ that declares its type.

double p = 2.3, q = 4.1;

Initialize variables "p" and "q" to 2.3 and 4.1 respectively.

2^7-1

What is the largest positive integer that can be stored using type byte?

0

0000 - in decimal

1

0001 - in decimal

2

0010 - in decimal

3

0011 - in decimal

4

0100 - in decimal

5

0101 - in decimal

6

0110 - in decimal

7

0111 - in decimal

8

1000 - in decimal

9

1001 - in decimal

A

1010 - in hexadecimal

B

1011 - in hexadecimal

C

1100 - in hexadecimal

D

1101 - in hexadecimal

E

1110 - in hexadecimal

F

1111 - in hexadecimal

NOT

!

AND

&&

OR

||

compound boolean expressions

Logical operators are applied to boolean expressions to form _______.

Escape sequence to print out a newline

\n

Escape sequence to print out a double quote

\

Escape sequence to print out a backslash

\\

system.out.println("Welcome to\na new line");

Print out the following statement:
Welcome to
a new line

for (initialization; termination condition; update statement)
{
statements
}

The general form of the "for" loop is...

exception

An _______ is an error condition that occurs during the execution of a Java program.