Prelim Extra Flashcards
A (n) loop is a special loop that is used when a definite number of iterations required
for
Statements in which an if structure is contained inside another if structure are called ______ if statements
nested
in switch structure break is followed by one of the possible values for the expression and a colon
(True or False)
F
_______ error occurs when the syntax of the program is correct and the program compiles but produces incorrect results when you execute it
logic
You use an import statement when you want to access a built-in-Java class that is contained in a group of classes called _______
package
*, /, % always take place after + or - in an expression
True or False
F
You can create a confirm dialog with 5 arguments
True or False
T
Describes the feature languages that allow the same word to be interpreted correctly in different situations based on the context
Polymorphism
It is important that the loop controlled ______ be altered within the body of the loop
Variable
The type to which all operands in an expression are converted so that they are compatible with each other
unifying type
Many seasoned programmers start counter values at 1 because they are used to doing so when working with arrays
(True or False)
F
When you place a block within if statement, it is crucial to place the _____ correctly
curly braces
When you block statements, you must remember that any ____ you declare within a block is local to that block
variable
one execution of any loop is called ______
iteration
is an error not detected until the program asks the computer to do something illegal or wrong while executing
run-time error
You can initialize more than one variable in a for loop by placing a(n) ______ between the separate statements
comma
______ structure is one that involves choosing between alternative courses of action based on some value within a program
decision
Failing to include a complete _____ on each side of an && operator in an if statement is a common error in Java programming
Boolean expression
_______ requires 3 expressions separated with a (?) and (:)
Conditional operator
is a loop that performs no actions other than looping
do-nothing loop
Is the process the compiler uses to divide your source code into meaningful portions; the message means that the compiler was in the process of analyzing the code when the end of the file was encountered prematurely
parsing
when a variable ceases to exist at the end of a method, programmers say the variable ______
goes out of scope
Instance methods are static methods
True or False
F
Method names that begin with _____ and set are very typical
read
call
get
next
get
Methods that retrieve values are called ______ methods
accessor
Parameters are the data items _____ by a method
required
You can place a class’s methods first within the class. followed by fields
(True or False)
T
A _______ constructor is one that requires no arguments
default
When you write _____ for a class, you no longer have access to the automatically created version
constructor
Public classes are accessible by all objects which means that public classes can be _____ or used as a basis for any other class
extended
For ease in locating class methods, many programmers store them in ______ order
alphabetical
A unique identifier is mostly used as a(n) ____ key in a database
primary
Data items you use in a call to a method are called _____
arguments
You can’t write a default constructor in Java; it must be provided automatically
(True or False)
F
is a number appended to a field, typically an ID number or account number
check-digit
is a method that creates and initializes class objects
constructor