JAVA
>
Flashcards
> Print Preview
The flashcards below were created by user
sappcc
on
FreezingBlue Flashcards
. What would you like to do?
Get the free app for
iOS
Get the free app for
Android
Learn more
defines the circumstances under which a class can be accessed and the other classes that have the right to use a class
access specifier
the indent style in which curly braces are aligned and each occupies its own line; it is named for Eric Allman, a programmer who popularized the style
Allman style
Java programs that are embedded in a Web page
applets
a computer program that performs tasks for users
application software
the feature of Java that allows you to write programs that run on any platform (operating system)
architecturally neutral
information passed to a method so it can perform its task
arguments
a phrase that describes the period of time during which a program executes
at run time
the characteristics that define an object as part of a class
attributes
comments that continue for as many lines as necessary; block comments start with / and end with /
block comments
programming statements that have been compiled into binary format
bytecode
to temporarily abandon the current logic so that the procedure’s commands can execute
call a procedure
a group or collection of objects with common properties
class
the set of data items and methods between the curly braces that follow the class header
class body
describes what attributes its objects will have and what those objects will be able to do
class definition
a program that translates language statements into machine code; it translates an enture program at once before any part of the program can execute
compiler
an error in which the compiler detects a violation of language syntax rules and is unable to translate the source code to machine code
compile-time error
applications that support character output to a computer screen in a DOS window
console applications
a GUI object resembling a window in which you can place messages you want to display
dialog box
the enclosure of data and methods within an object
encapsulation
a graphical environment in which users interact with a program; pronounced "gooeys"
graphical user interface (GUI)
a language that allows you to use an English-like vocabulary to write programs
high-level programming language
a name of a program component such as a class, object, or variable
identifier
a statement that accesses a built-in Java class that is contained in a package
import statement
the ability to create classes that share the attributes and methods of existing classes, but with more specific features
inheritance
a program that translates language statements into machine code; it translates one statement at a time, allowing a program to execute partially
interpreter
an object-oriented language developed by Sun Microsystems that is used for general-purpose business applications and for interactive Internet applications
Java
Use the ____ statement to indicate that a problem has occurred.
throw
Use class ____ to perform precise monetary calculations.
BigDecimal
String class static method ____ is similar to method System.out.printf, but returns a formatted String rather than displaying a String in a command window
format
The ____ states that code should be granted only the amount of privilege and access that it needs to accomplish its designated task.
principle of least privilege
Set methods are commonly called ____ because they typically change a value.
mutator methods
The public methods of a class are also known as the class's ____ or ____.
public services, public interface
An object's ____ method is called implicitly when an object appears in code where a String is needed.
toString
____ makes it explicit in the code, that you're constructing the base class using the no-arg constructor.
Super constructor
Keyword ____ specifies that a variable is not modifiable after initialization in a declaration or constructor.
final
The ____ is the one Java provides by default.
default constructor ex: public Dog() { }
If a method contains a local variable with the same name as one of its class's fields, the local variable ____ the field in that method's scope.
shadows
If a class declares constructors, the compiler will not create a(n) ____.
default constructor
Get methods are commonly called ____ or ____.
accessor methods, query methods
For every enum, the compiler generates a static method called ____ that returns an array of the enum's constants in the order in which they were declared.
values
Every object can access a reference to itself with keyword ___.
this (sometimes called the this reference)
The constructor which takes no arguments is called the ____.
no-argument constructor
Composition is sometimes referred to as a(n) ____ relationship.
has-a
Class ____ is used for formatting numeric values as locale-specific Strings.
NumberFormat
Any application that requires precise floating-point calculations should instead us class ____.
BidDecimal (from pachage java.math)
A(n) ____ variable represents classwide information that's shared by all the objects of the class.
static
A(n) ____ method tests whether a condition is true or false.
predicate
A(n) ___ imports all static members of a class
static import on demand
A(n) ____ declaration specifies on class to import.
single-type-import
A(n) ____ declaration imports only the classes that the program uses from a particular package.
type-import-on-demand
A(n) ____ declaration imports one static member.
single static import
______ allows to have more than one constructor inside one Class.
Constructor overloading
A(n) ____ declaration contains a comma-separated list of constants.
enum
Executes a body of statements continually as long as the Boolean expression that controls entry into the loop continues to be true.
while loop
The process of ensuring that a value falls within a specified range.
Validating data
Alters the value of the operand on the left by subtracting the operand on the right from it.
subtract and assign operator ( -= )
Alters the value of the operand on the left by assigning the remainder when the left operand is divided by the right operand.
remainder and assign operator ( %= )
The first input statement prior to a loop that will execute subsequent input statements for the same variable.
Priming read or priming input
One in which the loop control variable is tested before the loop body executes.
pretest loop
subtract 1 from a variable.
prefix and postfix decrement operators
Adds 1 to a variable, then evaluates it.
prefix ++ (prefix increment operator)
One in which the loop control variable is tested after the loop body executes.
posttest loop
Evaluates a variable, then adds 1 to it.
postfix ++ (postfix increment operator)
Contains another loop.
outer loop
Alters the value of the operand on the left by multiplying the operand on the right by it.
multiply and assign operator ( *= )
The technique of combining two loops into one.
Loop fusion
A variable whose value determines whether loop execution continues.
Loop control variable
The block of statements that executes when the Boolean expression that controls the loop is true.
Loop body
A structure that allows repeated execution of a block of statements.
Loop
One loop execution.
Iteration
Contained entirely within another loop.
inner loop
A loop that never ends.
infinite loop
A loop in which the final number of loops is unknown.
indefinite loop
Incrementing a variable adds 1 to its value.
Incrementing
A special loop that can be used when a definite number of loop iterations is required.
for loop
An indefinite loop is an event-controlled loop.
Event-controlled loop
A block with no statements in it.
Empty body
Executes a loop body at least one time; it checks the loop control variable at the bottom of the loop after one repetition has occurred.
do..while loop
One that performs no actions other than looping.
do-nothing loop
A definite loop.
Counter-controlled loop
One that needs three operands.
ternary operator
Uses up to four keywords to test a single variable against a series of exact integer or character values. The keywords are switch, case, break, and default.
switch statement
A decision structure that performs an action, or not, based on one alternative.
Single-alternative if
Describes the feature of the AND and OR operators in which evaluation is performed only as far as necessary to make a final decision.
Short-circuit evaluation
A logical structure in which one step follows another unconditionally.
Sequence structure
A series of statements that determine within which of a set of ranges a value falls.
Range check
A tool that helps programmers plan a program's logic by writing plain English statements.
Pseudocode
You use the NOT operator, which is written as the exclamation point ( ! ), to negate the result of any Boolean expression.
NOT operator
Contains an if structure within another if structure.
nested if statement
The logical OR operator uses two Boolean expressions as operands and evaluates to true if either operand is true. The OR operator is written as two pipes ( || ).
logical OR operator
The logical AND operator uses two Boolean expressions as operands and evaluates to true if both operands are true. The AND operator is written as two ampersands ( && ).
logical AND operator
In Java, the simplest statement you can use to make a decision is the if statement; you use it to write a single-alternative decision.
if statement
In Java, the if...else statement provides the mechanism to perform one action when a Boolean expression evaluates as true and to perform a different action when a Boolean expression evaluates as false.
if...else statement
The if clause of an if...else statement is the part that executes when the evaluated Boolean expression is true.
if clause
A tool that helps programmers plan a program's logic by writing the steps in diagram form, as a series of shapes connected by arrows.
Flowchart
Compares values and returns true if they are equal.
Equivalency operator (==)
Contains only a semicolon.
Empty statement
A format used in nested if statements in which each instance of else and its subsequent if are placed on the same line.
else...if clause
The else clause of an if...else statement is the part that executes when the evaluated Boolean expression is false.
else clause
A decision structure that takes one of two possible courses of action.
Dual-alternative if
A logical structure that involves choosing between alternative courses of action based on some value within a program.
Decision structure
Requires three expressions separated with a question mark and a colon and is used as an abbreviated version of the if...else structure.
conditional operator
True or false values are Boolean values; every computer decision results in a Boolean value.
Boolean values
An asterisk - a symbol used to indicate that it can be replaced by any set of characters. In a Java import statement, you use a wildcard symbol to represent all the classes in a package.
Wildcard symbol
The containing class in nested classes.
Top-level class
A reference to an object that is passed to any object's nonstatic class method.
this Reference
A type of nested class that has access to all static methods of its to-level class.
static member class
The action that occurs when a local variable hides a variable with the same name that is further away in scope.
Shadowing
An object's memory address.
Reference
To attempt to declare it twice - an illegal action.
Redeclare a variable
A library of classes.
Package
A variable overrides another with the same name when it takes precedence over the other variable.
Overrides
Involves using one term to indicate diverse meanings, or writing multiple methods with the same name but with different arguments.
Overloading
Nested classes that require an instance.
Nonstatic member classes or inner classes
Classes contained in other classes.
Nested classes
A folder that provides a convenient grouping for classes.
Library of classes
The java.lang package is implicitly imported into every java program.
java.lang
Describes the relationship between classes when an object of one class is a data field within another class.
Composition
Static variables that are shared by every instantiation of a class.
Class variables
The code between a pair of curly braces.
Block
Nested, local classes that have no identifier.
Anonymous classes
An ambiguous situation is one in which the compiler cannot determine which method to use.
Ambiguous
Unreachable statements are those that cannot be executed because the logical path can never encounter them; an unreachable statement causes a compiler error.
Unreachable statements
A method that contains no statements; programmers create stubs as temporary placeholders during the program development process.
Stub
A method's signature is the combination of the method name and the number, types, and order of arguments.
Signature (method)
Indicates the type of data that, upon completion of the method, is sent back to its calling method.
Return type
Ends a method and frequently sends a value from a called method back to the calling method.
Return statement
To return a value is to send the value from a called method back to the calling method.
Return a value
The name for a memory address where the object is held.
Reference to an object
Assigning private access to a field means that no other classes can access the field's values, and only methods of the same class are allowed to set, get, or otherwise use private variables.
Private access
A unique identifier for data within a database.
Primary key
The data items received by a method.
Parameters
Allocates the memory needed to hold an object.
new operator
Mutator methods set values.
Mutator methods
It's return type.
Method's type
The first line of the method and contains information about how other methods can interact with it.
Method header
The set of statements between curly braces that follow the header and that carry out the method's actions.
Method body
A program module that contains a series of statements that carry out a task.
Method
Known only within the boundaries of a method.
Local variable
When you invoke or call a method, you execute it.
Invoke or Call
The interface to a method includes the method's return type, name, and arguments. It is the part that a client sees and uses.
Interface
An instantiation of a class is an object; In other words, it is one tangible example of a class.
Instantiation
The instance variables of a class are its data components.
Instance variables
Nonstatic methods, those methods used with object instantiations, are called instance methods.
Instance methods
The object-oriented programming principle used when creating private access for data fields; a class's private data can be changed or manipulated only by a class's own methods and not by methods that belong to other classes.
Information hiding
A principle of object-oriented programming that describes the encapsulation of method details within a class.
Implementation hiding
Describes the actions that execute within a method - the method body.
Implementation
One that requires no parameters; if you do not write one, a default constructor is created for a class automatically by the Java compiler.
Default constructor
Another name for a method header.
Declaration
A set of statements that are logically unreachable.
Dead code
Data variables declared in a class outside of any method.
Data fields
A method that establishes an object.
Constructor
A method calls another.
Client method
The calling method makes a method call that invokes the called method.
Calling method
Data items sent to methods in a method call.
Arguments
The arguments in a method call.
Actual parameters
Sometimes used as another term for access specifier.
Access modifier
A statement that reserves a named memory location.
Variable declaration
A built-in Java class that provides you with the means for storing and manipulating character strings.
String
The short data type holds small integers, from -32,768 to 32,767.
short
The scope of a data item is the area in which it is visible to a program and in which you can refer to it using its simple identifier.
Scope
The remainder operator is the percent sign; when it is used with two integers, the result is an integer with the value of the remainder after division takes place.
Remainder operator
A simple data type. Java's primitive types are byte, short, int, long, float, double, char, and boolean.
Primitive type
To break into component parts.
Parse
An empty String created by typing a set of quotes with nothing between them.
Null String
Sometimes abbreviated as mod, it is an alternate name for the remainder operator.
Modulus operator
The long data type holds very large integers from -9,233,372,036,854,775,808 to 9,223,372,036,854,775,807.
long
A value that is taken literally at each use.
Literal constant
An assignment made when you declare a variable.
Initialization
An item's data type describes the type of data that can be stored there, how much memory the item occupies, and what types of operations can be performed on the data.
Data type
The char data type is used to hold any single character.
char
A style in which an identifier begins with a lowercase letter and subsequent words within the identifier are capitalized.
Camel casing
The byte data type holds very small integers, from -128 to 127.
byte
a programming error that occurs when you introduce typing errors or use the programming language incorrectly
syntax error
the rules of a language
syntax
a keyword that means that a method is accessible and usable even though no objects of the class exist
static
an error that occurs when a program compiles successfully but does not execute
run-time error
the attributes of a class
properties
sending arguments to a method
passing arguments
a program that creates classes, creates objects from those classes, and creates applications that use those objects--objects can be envisioned as concrete objects in the real world that you manipulate to achieve the desired effect
object-oriented program
a self-contained block of program code, similar to a procedure
method
a circuitry-level language that represents a series of on and off switches; another term for machine language
machine code
a language written to correspond closely to a computer processor's circuitry
low-level programming language
an error that occurs when a program compiles successfully but produces an error during execution
logic error
comments that start with // and continue to the end of the current line
line comments
a hypothetical (software-based) computer on which Java runs
Java Virtual Machine (JVM)
a program that checks bytecode and communicates with the operating system, executing the bytecode instructions line by line within the Java Virtual Machine
Java interpreter
block comments that generate documentation; Javadoc comments begin with /* and end with /
Javadoc comments
a program that translates language statements into machine code; it translates one statement at a time, allowing a program to execute partially
interpreter
a statement that accesses a built-in Java class that is contained in a package
import statement
Card Set Information
Author:
sappcc
ID:
310754
Filename:
JAVA
Updated:
2015-11-02 05:12:03
JAVA midterm
Folders:
JAVA
Description:
JAVA
Show Answers:
What would you like to do?
Get the free app for
iOS
Get the free app for
Android
Learn more
>
Flashcards
> Print Preview