Deck 2: Using Data

ملء الشاشة (f)
exit full mode
سؤال
In Java, ____ is a built-in class that provides you with the means for storing and manipulating character strings.

A) Escape
B) Type
C) String
D) Character
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Even if a statement occupies multiple lines, the statement is not complete until the semicolon is reached.
سؤال
A variable can hold more than one value at a time.
سؤال
You use the ____ data type to hold any single character.

A) single
B) char
C) byte
D) float
سؤال
The term parse means to break into component parts.
سؤال
____ refers to the order in which values are used with operators.

A) Associativity
B) Initialization
C) Declaration
D) Floating
سؤال
The byte and short data types occupy less memory and can hold only smaller values.
سؤال
The term ____ refers to the mathematical accuracy of a value.

A) float data
B) real integers
C) significant digits
D) single-precision floating-point number
سؤال
Primitive types serve as the building blocks for more complex data types, called ____ types.

A) integer
B) literal
C) reference
D) data
سؤال
A data item is ____ when it cannot be changed while a program is running.

A) variable
B) constant
C) primitive
D) literal
سؤال
In Java, you use variables of type ____ to store integers, or whole numbers.

A) num
B) double
C) var
D) int
سؤال
The expression   boolean isTenLarger = (10 < 5) will produce a value of true .
سؤال
You can declare as many variables in a statement as you want, as long as the variables are different data types.
سؤال
A ____ is a named memory location that you can use to store a value.

A) cast
B) variable
C) reference
D) primitive
سؤال
A ____ data type can hold 14 or 15 significant digits of accuracy.

A) double
B) float
C) char
D) boolean
سؤال
You can create a confirm dialog box with five arguments.
سؤال
A(n) ____ variable can hold only one of two values: true or false .

A) integer
B) boolean
C) true
D) comparison
سؤال
You are limited to declaring a maximum of three variables in a single statement.
سؤال
Multiplication, division, and remainder always take place after addition or subtraction in an expression.
سؤال
The int data type is the most commonly used integer type.
سؤال
Each primitive type in Java has a corresponding class contained in the java.lang package. These classes are called ____ classes.

A) case
B) primitive
C) type-wrapper
D) show
سؤال
The ____ is the type to which all operands in an expression are converted so that they are compatible with each other.

A) unifying type
B) data type
C) numbered
D) primitive
سؤال
A(n) ____ number contains decimal positions.

A) char
B) int
C) float
D) boolean
سؤال
A(n) ____ dialog box typically displays the options Yes, No, and Cancel.

A) confirm
B) input
C) message
D) answer
سؤال
When a numeric variable is concatenated to a String , the entire expression becomes a(n) ____ .

A) int
B) constant
C) method
D) String
سؤال
You use ____ operators to perform calculations with values in your programs.

A) calculation
B) arithmetic
C) integer
D) precedence
سؤال
The characters ____ move the cursor to the next line when used within a println() statement.

A) /n
B) \n
C) .+
D) $
سؤال
Which line of code correctly creates a Scanner object?

A) Scanner inputDevice = new Scanner(System);
B) Scanner inputDevice = new Scanner(System.in)
C) Scanner inputDevice = new Scanner(in);
D) Scanner inputDevice = new Scanner(System.in);
سؤال
____ occurs when both of the operands are integers.

A) Data modeling
B) Type cast
C) Integer division
D) Unlike assignment
سؤال
A(n)____ operator compares two items and the result has a Boolean value.

A) complex
B) relational
C) unary
D) remainder
سؤال
The percent sign is the ____ operator.

A) remainder
B) remaining
C) percentage
D) integer division
سؤال
You may declare an unlimited number of variables in a statement as long as the variables are ____.

A) the same data type
B) initialized to the same value
C) properly commented
D) floating point numbers
سؤال
You can store any character, including nonprinting characters such as a backspace or a tab, in a(n) ____ variable.

A) int
B) char
C) boolean
D) set
سؤال
Which of the following is NOT a component of a variable declaration statement?

A) data type identifier
B) ending colon
C) variable name
D) ending semicolon
سؤال
A(n) ____ dialog box asks a question and provides a text field in which the user can enter a response.

A) question
B) JOptPane
C) confirm
D) input
سؤال
What is the value of result after the following statement is executed? int result = 2 + 3 * 4;

A) 9
B) 10
C) 14
D) 20
سؤال
In Java, when a numeric variable is concatenated to a String using the ____, the entire expression becomes a String .

A) plus sign
B) equal sign
C) concatenate statement
D) string statement
سؤال
____ forces a value of one data type to be used as a value of another type.

A) Type casting
B) Lossless conversion
C) A type-wrapper class
D) Parsing
سؤال
Which escape sequence will move the cursor to the beginning of the current line?

A) \b
B) \r
C) \\
D) \n
سؤال
A(n) ____ is a simple data type.

A) reference type
B) lvalue
C) primitive type
D) unifying type
سؤال
Match between columns
Created by placing the desired result type in parentheses
operand.
Created by placing the desired result type in parentheses
cast operator.
Created by placing the desired result type in parentheses
assignment.
Created by placing the desired result type in parentheses
operator precedence.
Created by placing the desired result type in parentheses
garbage value.
Created by placing the desired result type in parentheses
primitive type.
Created by placing the desired result type in parentheses
float.
Created by placing the desired result type in parentheses
boolean
Created by placing the desired result type in parentheses
escape sequence
Created by placing the desired result type in parentheses
primitive type
Created by placing the desired result type in parentheses
blank final
Created by placing the desired result type in parentheses
parse
Created by placing the desired result type in parentheses
promotion
Created by placing the desired result type in parentheses
keyboard buffer
Created by placing the desired result type in parentheses
lvalue
سؤال
Match between columns
Java consistently specifies their size and format
operand.
Java consistently specifies their size and format
cast operator.
Java consistently specifies their size and format
assignment.
Java consistently specifies their size and format
operator precedence.
Java consistently specifies their size and format
garbage value.
Java consistently specifies their size and format
primitive type.
Java consistently specifies their size and format
float.
Java consistently specifies their size and format
boolean
Java consistently specifies their size and format
escape sequence
Java consistently specifies their size and format
primitive type
Java consistently specifies their size and format
blank final
Java consistently specifies their size and format
parse
Java consistently specifies their size and format
promotion
Java consistently specifies their size and format
keyboard buffer
Java consistently specifies their size and format
lvalue
سؤال
Match between columns
A floating-point data type
operand.
A floating-point data type
cast operator.
A floating-point data type
assignment.
A floating-point data type
operator precedence.
A floating-point data type
garbage value.
A floating-point data type
primitive type.
A floating-point data type
float.
A floating-point data type
boolean
A floating-point data type
escape sequence
A floating-point data type
primitive type
A floating-point data type
blank final
A floating-point data type
parse
A floating-point data type
promotion
A floating-point data type
keyboard buffer
A floating-point data type
lvalue
سؤال
Match between columns
Begins with a backslash followed by a character
operand.
Begins with a backslash followed by a character
cast operator.
Begins with a backslash followed by a character
assignment.
Begins with a backslash followed by a character
operator precedence.
Begins with a backslash followed by a character
garbage value.
Begins with a backslash followed by a character
primitive type.
Begins with a backslash followed by a character
float.
Begins with a backslash followed by a character
boolean
Begins with a backslash followed by a character
escape sequence
Begins with a backslash followed by a character
primitive type
Begins with a backslash followed by a character
blank final
Begins with a backslash followed by a character
parse
Begins with a backslash followed by a character
promotion
Begins with a backslash followed by a character
keyboard buffer
Begins with a backslash followed by a character
lvalue
سؤال
A data item's ____ is the area in which it is visible to a program and in which you can refer to it using its simple identifier.

A) data type
B) token
C) case
D) scope
سؤال
The Scanner class contains methods that retrieve values called ____.

A) prompts
B) whitespace
C) finals
D) tokens
سؤال
Match between columns
A value that can be used on either side of an operator
operand.
A value that can be used on either side of an operator
cast operator.
A value that can be used on either side of an operator
assignment.
A value that can be used on either side of an operator
operator precedence.
A value that can be used on either side of an operator
garbage value.
A value that can be used on either side of an operator
primitive type.
A value that can be used on either side of an operator
float.
A value that can be used on either side of an operator
boolean
A value that can be used on either side of an operator
escape sequence
A value that can be used on either side of an operator
primitive type
A value that can be used on either side of an operator
blank final
A value that can be used on either side of an operator
parse
A value that can be used on either side of an operator
promotion
A value that can be used on either side of an operator
keyboard buffer
A value that can be used on either side of an operator
lvalue
سؤال
Match between columns
The operator that is represented by an equal sign (=)
operand.
The operator that is represented by an equal sign (=)
cast operator.
The operator that is represented by an equal sign (=)
assignment.
The operator that is represented by an equal sign (=)
operator precedence.
The operator that is represented by an equal sign (=)
garbage value.
The operator that is represented by an equal sign (=)
primitive type.
The operator that is represented by an equal sign (=)
float.
The operator that is represented by an equal sign (=)
boolean
The operator that is represented by an equal sign (=)
escape sequence
The operator that is represented by an equal sign (=)
primitive type
The operator that is represented by an equal sign (=)
blank final
The operator that is represented by an equal sign (=)
parse
The operator that is represented by an equal sign (=)
promotion
The operator that is represented by an equal sign (=)
keyboard buffer
The operator that is represented by an equal sign (=)
lvalue
سؤال
Match between columns
Break into component parts
operand.
Break into component parts
cast operator.
Break into component parts
assignment.
Break into component parts
operator precedence.
Break into component parts
garbage value.
Break into component parts
primitive type.
Break into component parts
float.
Break into component parts
boolean
Break into component parts
escape sequence
Break into component parts
primitive type
Break into component parts
blank final
Break into component parts
parse
Break into component parts
promotion
Break into component parts
keyboard buffer
Break into component parts
lvalue
سؤال
Match between columns
Can appear on the left side of an assignment operator
operand.
Can appear on the left side of an assignment operator
cast operator.
Can appear on the left side of an assignment operator
assignment.
Can appear on the left side of an assignment operator
operator precedence.
Can appear on the left side of an assignment operator
garbage value.
Can appear on the left side of an assignment operator
primitive type.
Can appear on the left side of an assignment operator
float.
Can appear on the left side of an assignment operator
boolean
Can appear on the left side of an assignment operator
escape sequence
Can appear on the left side of an assignment operator
primitive type
Can appear on the left side of an assignment operator
blank final
Can appear on the left side of an assignment operator
parse
Can appear on the left side of an assignment operator
promotion
Can appear on the left side of an assignment operator
keyboard buffer
Can appear on the left side of an assignment operator
lvalue
سؤال
Match between columns
Converts nonconforming types to the unifying type
operand.
Converts nonconforming types to the unifying type
cast operator.
Converts nonconforming types to the unifying type
assignment.
Converts nonconforming types to the unifying type
operator precedence.
Converts nonconforming types to the unifying type
garbage value.
Converts nonconforming types to the unifying type
primitive type.
Converts nonconforming types to the unifying type
float.
Converts nonconforming types to the unifying type
boolean
Converts nonconforming types to the unifying type
escape sequence
Converts nonconforming types to the unifying type
primitive type
Converts nonconforming types to the unifying type
blank final
Converts nonconforming types to the unifying type
parse
Converts nonconforming types to the unifying type
promotion
Converts nonconforming types to the unifying type
keyboard buffer
Converts nonconforming types to the unifying type
lvalue
سؤال
Which statement declares a constant named SALESAMT with a value of 20.99?

A) double SALESAMT = 20.99;
B) final SALESAMT = 20.99;
C) final double SALESAMT = 20.99;
D) final double SALESAMT (20.99);
سؤال
Match between columns
Rules for the order in which parts of a mathematical expression are evaluated
operand.
Rules for the order in which parts of a mathematical expression are evaluated
cast operator.
Rules for the order in which parts of a mathematical expression are evaluated
assignment.
Rules for the order in which parts of a mathematical expression are evaluated
operator precedence.
Rules for the order in which parts of a mathematical expression are evaluated
garbage value.
Rules for the order in which parts of a mathematical expression are evaluated
primitive type.
Rules for the order in which parts of a mathematical expression are evaluated
float.
Rules for the order in which parts of a mathematical expression are evaluated
boolean
Rules for the order in which parts of a mathematical expression are evaluated
escape sequence
Rules for the order in which parts of a mathematical expression are evaluated
primitive type
Rules for the order in which parts of a mathematical expression are evaluated
blank final
Rules for the order in which parts of a mathematical expression are evaluated
parse
Rules for the order in which parts of a mathematical expression are evaluated
promotion
Rules for the order in which parts of a mathematical expression are evaluated
keyboard buffer
Rules for the order in which parts of a mathematical expression are evaluated
lvalue
سؤال
The cast operator is a ____ operator.

A) unary
B) binary
C) ternary
D) boolean
سؤال
Match between columns
Uninitialized constant
operand.
Uninitialized constant
cast operator.
Uninitialized constant
assignment.
Uninitialized constant
operator precedence.
Uninitialized constant
garbage value.
Uninitialized constant
primitive type.
Uninitialized constant
float.
Uninitialized constant
boolean
Uninitialized constant
escape sequence
Uninitialized constant
primitive type
Uninitialized constant
blank final
Uninitialized constant
parse
Uninitialized constant
promotion
Uninitialized constant
keyboard buffer
Uninitialized constant
lvalue
سؤال
A dialog box that displays the options Yes, No, and Cancel can be created using the ____ method in the JOptionPane class.

A) showDialog()
B) showConfirmDialog()
C) JOptionDialog()
D) ConfirmDialog()
سؤال
Match between columns
Also called the type-ahead buffer
operand.
Also called the type-ahead buffer
cast operator.
Also called the type-ahead buffer
assignment.
Also called the type-ahead buffer
operator precedence.
Also called the type-ahead buffer
garbage value.
Also called the type-ahead buffer
primitive type.
Also called the type-ahead buffer
float.
Also called the type-ahead buffer
boolean
Also called the type-ahead buffer
escape sequence
Also called the type-ahead buffer
primitive type
Also called the type-ahead buffer
blank final
Also called the type-ahead buffer
parse
Also called the type-ahead buffer
promotion
Also called the type-ahead buffer
keyboard buffer
Also called the type-ahead buffer
lvalue
سؤال
Match between columns
A programming term for an unknown value
operand.
A programming term for an unknown value
cast operator.
A programming term for an unknown value
assignment.
A programming term for an unknown value
operator precedence.
A programming term for an unknown value
garbage value.
A programming term for an unknown value
primitive type.
A programming term for an unknown value
float.
A programming term for an unknown value
boolean
A programming term for an unknown value
escape sequence
A programming term for an unknown value
primitive type
A programming term for an unknown value
blank final
A programming term for an unknown value
parse
A programming term for an unknown value
promotion
A programming term for an unknown value
keyboard buffer
A programming term for an unknown value
lvalue
سؤال
Match between columns
A simple data type
operand.
A simple data type
cast operator.
A simple data type
assignment.
A simple data type
operator precedence.
A simple data type
garbage value.
A simple data type
primitive type.
A simple data type
float.
A simple data type
boolean
A simple data type
escape sequence
A simple data type
primitive type
A simple data type
blank final
A simple data type
parse
A simple data type
promotion
A simple data type
keyboard buffer
A simple data type
lvalue
سؤال
Match between columns
true or false
operand.
true or false
cast operator.
true or false
assignment.
true or false
operator precedence.
true or false
garbage value.
true or false
primitive type.
true or false
float.
true or false
boolean
true or false
escape sequence
true or false
primitive type
true or false
blank final
true or false
parse
true or false
promotion
true or false
keyboard buffer
true or false
lvalue
سؤال
Describe how the use of named constants can provide advantages over the use of literal values.
سؤال
A variable declaration is a statement that reserves a named memory location. It includes what four elements?
سؤال
import javax.swing.JOptionPane;
public class salesJune
{
    public static void main(String[] args)
    {
       int storeSales = 250;
    }
}
In the above code, complete the statement that will display a message dialog box that will appear centered on the screen and will display the following text:
Congratulations! June sales were $250!
سؤال
Describe and give an example of operator precedence.
سؤال
Write the statement that will declare a char data type named testScore that will hold a letter grade of your choice.
سؤال
final int COSTPERITEM = 10;
double sales2012 = amtSold * COSTPERITEM;
In the above statements, identify the named constant and describe how a programmer can recognize named constants.
سؤال
What is an escape sequence and why would a Java programmer use it to store a character?
سؤال
What is the difference between the float data type and the double data type?
سؤال
Describe how the Scanner class works with the System.in object in order to provide flexibility. Provide an example of using the Scanner class with System.in.
سؤال
Describe three ways in which a named constant differs from a variable.
سؤال
How would you ask the user to confirm an action using a dialog box?
سؤال
Write the statement to declare an uninitialized integer value for salesAmt . Then write the statement to declare a constant named SALESAMT with a value of 20.99.
سؤال
Write the statement that will declare and assign two integer variables, salesAmt and costAmt , in a single statement. Assign values of your choice to the variables.
سؤال
Describe how to use the boolean data type. Show two examples of a boolean variable assignment; one that uses true or false and one that uses a relational operator.
سؤال
How can you create and use an input dialog box in Java?
سؤال
Explain how you can override a unifying type imposed by Java. Show an example.
سؤال
Define an integer and then list and describe the four integer data data types.
سؤال
In Java, how is it possible to perform mathematical operations on operands with unlike types?
سؤال
Describe why it is important to assign an appropriate data type to variables in an application.
سؤال
100 = salesAmount;
In terms of assignment operators, why is the above statement illegal?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/81
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 2: Using Data
1
In Java, ____ is a built-in class that provides you with the means for storing and manipulating character strings.

A) Escape
B) Type
C) String
D) Character
C
2
Even if a statement occupies multiple lines, the statement is not complete until the semicolon is reached.
True
3
A variable can hold more than one value at a time.
False
4
You use the ____ data type to hold any single character.

A) single
B) char
C) byte
D) float
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
5
The term parse means to break into component parts.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
6
____ refers to the order in which values are used with operators.

A) Associativity
B) Initialization
C) Declaration
D) Floating
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
7
The byte and short data types occupy less memory and can hold only smaller values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
8
The term ____ refers to the mathematical accuracy of a value.

A) float data
B) real integers
C) significant digits
D) single-precision floating-point number
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
9
Primitive types serve as the building blocks for more complex data types, called ____ types.

A) integer
B) literal
C) reference
D) data
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
10
A data item is ____ when it cannot be changed while a program is running.

A) variable
B) constant
C) primitive
D) literal
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
11
In Java, you use variables of type ____ to store integers, or whole numbers.

A) num
B) double
C) var
D) int
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
12
The expression   boolean isTenLarger = (10 < 5) will produce a value of true .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
13
You can declare as many variables in a statement as you want, as long as the variables are different data types.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
14
A ____ is a named memory location that you can use to store a value.

A) cast
B) variable
C) reference
D) primitive
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
15
A ____ data type can hold 14 or 15 significant digits of accuracy.

A) double
B) float
C) char
D) boolean
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
16
You can create a confirm dialog box with five arguments.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
17
A(n) ____ variable can hold only one of two values: true or false .

A) integer
B) boolean
C) true
D) comparison
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
18
You are limited to declaring a maximum of three variables in a single statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
19
Multiplication, division, and remainder always take place after addition or subtraction in an expression.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
20
The int data type is the most commonly used integer type.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
21
Each primitive type in Java has a corresponding class contained in the java.lang package. These classes are called ____ classes.

A) case
B) primitive
C) type-wrapper
D) show
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
22
The ____ is the type to which all operands in an expression are converted so that they are compatible with each other.

A) unifying type
B) data type
C) numbered
D) primitive
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
23
A(n) ____ number contains decimal positions.

A) char
B) int
C) float
D) boolean
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
24
A(n) ____ dialog box typically displays the options Yes, No, and Cancel.

A) confirm
B) input
C) message
D) answer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
25
When a numeric variable is concatenated to a String , the entire expression becomes a(n) ____ .

A) int
B) constant
C) method
D) String
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
26
You use ____ operators to perform calculations with values in your programs.

A) calculation
B) arithmetic
C) integer
D) precedence
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
27
The characters ____ move the cursor to the next line when used within a println() statement.

A) /n
B) \n
C) .+
D) $
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
28
Which line of code correctly creates a Scanner object?

A) Scanner inputDevice = new Scanner(System);
B) Scanner inputDevice = new Scanner(System.in)
C) Scanner inputDevice = new Scanner(in);
D) Scanner inputDevice = new Scanner(System.in);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
29
____ occurs when both of the operands are integers.

A) Data modeling
B) Type cast
C) Integer division
D) Unlike assignment
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
30
A(n)____ operator compares two items and the result has a Boolean value.

A) complex
B) relational
C) unary
D) remainder
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
31
The percent sign is the ____ operator.

A) remainder
B) remaining
C) percentage
D) integer division
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
32
You may declare an unlimited number of variables in a statement as long as the variables are ____.

A) the same data type
B) initialized to the same value
C) properly commented
D) floating point numbers
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
33
You can store any character, including nonprinting characters such as a backspace or a tab, in a(n) ____ variable.

A) int
B) char
C) boolean
D) set
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
34
Which of the following is NOT a component of a variable declaration statement?

A) data type identifier
B) ending colon
C) variable name
D) ending semicolon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
35
A(n) ____ dialog box asks a question and provides a text field in which the user can enter a response.

A) question
B) JOptPane
C) confirm
D) input
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
36
What is the value of result after the following statement is executed? int result = 2 + 3 * 4;

A) 9
B) 10
C) 14
D) 20
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
37
In Java, when a numeric variable is concatenated to a String using the ____, the entire expression becomes a String .

A) plus sign
B) equal sign
C) concatenate statement
D) string statement
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
38
____ forces a value of one data type to be used as a value of another type.

A) Type casting
B) Lossless conversion
C) A type-wrapper class
D) Parsing
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
39
Which escape sequence will move the cursor to the beginning of the current line?

A) \b
B) \r
C) \\
D) \n
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
40
A(n) ____ is a simple data type.

A) reference type
B) lvalue
C) primitive type
D) unifying type
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
41
Match between columns
Created by placing the desired result type in parentheses
operand.
Created by placing the desired result type in parentheses
cast operator.
Created by placing the desired result type in parentheses
assignment.
Created by placing the desired result type in parentheses
operator precedence.
Created by placing the desired result type in parentheses
garbage value.
Created by placing the desired result type in parentheses
primitive type.
Created by placing the desired result type in parentheses
float.
Created by placing the desired result type in parentheses
boolean
Created by placing the desired result type in parentheses
escape sequence
Created by placing the desired result type in parentheses
primitive type
Created by placing the desired result type in parentheses
blank final
Created by placing the desired result type in parentheses
parse
Created by placing the desired result type in parentheses
promotion
Created by placing the desired result type in parentheses
keyboard buffer
Created by placing the desired result type in parentheses
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
42
Match between columns
Java consistently specifies their size and format
operand.
Java consistently specifies their size and format
cast operator.
Java consistently specifies their size and format
assignment.
Java consistently specifies their size and format
operator precedence.
Java consistently specifies their size and format
garbage value.
Java consistently specifies their size and format
primitive type.
Java consistently specifies their size and format
float.
Java consistently specifies their size and format
boolean
Java consistently specifies their size and format
escape sequence
Java consistently specifies their size and format
primitive type
Java consistently specifies their size and format
blank final
Java consistently specifies their size and format
parse
Java consistently specifies their size and format
promotion
Java consistently specifies their size and format
keyboard buffer
Java consistently specifies their size and format
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
43
Match between columns
A floating-point data type
operand.
A floating-point data type
cast operator.
A floating-point data type
assignment.
A floating-point data type
operator precedence.
A floating-point data type
garbage value.
A floating-point data type
primitive type.
A floating-point data type
float.
A floating-point data type
boolean
A floating-point data type
escape sequence
A floating-point data type
primitive type
A floating-point data type
blank final
A floating-point data type
parse
A floating-point data type
promotion
A floating-point data type
keyboard buffer
A floating-point data type
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
44
Match between columns
Begins with a backslash followed by a character
operand.
Begins with a backslash followed by a character
cast operator.
Begins with a backslash followed by a character
assignment.
Begins with a backslash followed by a character
operator precedence.
Begins with a backslash followed by a character
garbage value.
Begins with a backslash followed by a character
primitive type.
Begins with a backslash followed by a character
float.
Begins with a backslash followed by a character
boolean
Begins with a backslash followed by a character
escape sequence
Begins with a backslash followed by a character
primitive type
Begins with a backslash followed by a character
blank final
Begins with a backslash followed by a character
parse
Begins with a backslash followed by a character
promotion
Begins with a backslash followed by a character
keyboard buffer
Begins with a backslash followed by a character
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
45
A data item's ____ is the area in which it is visible to a program and in which you can refer to it using its simple identifier.

A) data type
B) token
C) case
D) scope
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
46
The Scanner class contains methods that retrieve values called ____.

A) prompts
B) whitespace
C) finals
D) tokens
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
47
Match between columns
A value that can be used on either side of an operator
operand.
A value that can be used on either side of an operator
cast operator.
A value that can be used on either side of an operator
assignment.
A value that can be used on either side of an operator
operator precedence.
A value that can be used on either side of an operator
garbage value.
A value that can be used on either side of an operator
primitive type.
A value that can be used on either side of an operator
float.
A value that can be used on either side of an operator
boolean
A value that can be used on either side of an operator
escape sequence
A value that can be used on either side of an operator
primitive type
A value that can be used on either side of an operator
blank final
A value that can be used on either side of an operator
parse
A value that can be used on either side of an operator
promotion
A value that can be used on either side of an operator
keyboard buffer
A value that can be used on either side of an operator
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
48
Match between columns
The operator that is represented by an equal sign (=)
operand.
The operator that is represented by an equal sign (=)
cast operator.
The operator that is represented by an equal sign (=)
assignment.
The operator that is represented by an equal sign (=)
operator precedence.
The operator that is represented by an equal sign (=)
garbage value.
The operator that is represented by an equal sign (=)
primitive type.
The operator that is represented by an equal sign (=)
float.
The operator that is represented by an equal sign (=)
boolean
The operator that is represented by an equal sign (=)
escape sequence
The operator that is represented by an equal sign (=)
primitive type
The operator that is represented by an equal sign (=)
blank final
The operator that is represented by an equal sign (=)
parse
The operator that is represented by an equal sign (=)
promotion
The operator that is represented by an equal sign (=)
keyboard buffer
The operator that is represented by an equal sign (=)
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
49
Match between columns
Break into component parts
operand.
Break into component parts
cast operator.
Break into component parts
assignment.
Break into component parts
operator precedence.
Break into component parts
garbage value.
Break into component parts
primitive type.
Break into component parts
float.
Break into component parts
boolean
Break into component parts
escape sequence
Break into component parts
primitive type
Break into component parts
blank final
Break into component parts
parse
Break into component parts
promotion
Break into component parts
keyboard buffer
Break into component parts
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
50
Match between columns
Can appear on the left side of an assignment operator
operand.
Can appear on the left side of an assignment operator
cast operator.
Can appear on the left side of an assignment operator
assignment.
Can appear on the left side of an assignment operator
operator precedence.
Can appear on the left side of an assignment operator
garbage value.
Can appear on the left side of an assignment operator
primitive type.
Can appear on the left side of an assignment operator
float.
Can appear on the left side of an assignment operator
boolean
Can appear on the left side of an assignment operator
escape sequence
Can appear on the left side of an assignment operator
primitive type
Can appear on the left side of an assignment operator
blank final
Can appear on the left side of an assignment operator
parse
Can appear on the left side of an assignment operator
promotion
Can appear on the left side of an assignment operator
keyboard buffer
Can appear on the left side of an assignment operator
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
51
Match between columns
Converts nonconforming types to the unifying type
operand.
Converts nonconforming types to the unifying type
cast operator.
Converts nonconforming types to the unifying type
assignment.
Converts nonconforming types to the unifying type
operator precedence.
Converts nonconforming types to the unifying type
garbage value.
Converts nonconforming types to the unifying type
primitive type.
Converts nonconforming types to the unifying type
float.
Converts nonconforming types to the unifying type
boolean
Converts nonconforming types to the unifying type
escape sequence
Converts nonconforming types to the unifying type
primitive type
Converts nonconforming types to the unifying type
blank final
Converts nonconforming types to the unifying type
parse
Converts nonconforming types to the unifying type
promotion
Converts nonconforming types to the unifying type
keyboard buffer
Converts nonconforming types to the unifying type
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
52
Which statement declares a constant named SALESAMT with a value of 20.99?

A) double SALESAMT = 20.99;
B) final SALESAMT = 20.99;
C) final double SALESAMT = 20.99;
D) final double SALESAMT (20.99);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
53
Match between columns
Rules for the order in which parts of a mathematical expression are evaluated
operand.
Rules for the order in which parts of a mathematical expression are evaluated
cast operator.
Rules for the order in which parts of a mathematical expression are evaluated
assignment.
Rules for the order in which parts of a mathematical expression are evaluated
operator precedence.
Rules for the order in which parts of a mathematical expression are evaluated
garbage value.
Rules for the order in which parts of a mathematical expression are evaluated
primitive type.
Rules for the order in which parts of a mathematical expression are evaluated
float.
Rules for the order in which parts of a mathematical expression are evaluated
boolean
Rules for the order in which parts of a mathematical expression are evaluated
escape sequence
Rules for the order in which parts of a mathematical expression are evaluated
primitive type
Rules for the order in which parts of a mathematical expression are evaluated
blank final
Rules for the order in which parts of a mathematical expression are evaluated
parse
Rules for the order in which parts of a mathematical expression are evaluated
promotion
Rules for the order in which parts of a mathematical expression are evaluated
keyboard buffer
Rules for the order in which parts of a mathematical expression are evaluated
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
54
The cast operator is a ____ operator.

A) unary
B) binary
C) ternary
D) boolean
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
55
Match between columns
Uninitialized constant
operand.
Uninitialized constant
cast operator.
Uninitialized constant
assignment.
Uninitialized constant
operator precedence.
Uninitialized constant
garbage value.
Uninitialized constant
primitive type.
Uninitialized constant
float.
Uninitialized constant
boolean
Uninitialized constant
escape sequence
Uninitialized constant
primitive type
Uninitialized constant
blank final
Uninitialized constant
parse
Uninitialized constant
promotion
Uninitialized constant
keyboard buffer
Uninitialized constant
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
56
A dialog box that displays the options Yes, No, and Cancel can be created using the ____ method in the JOptionPane class.

A) showDialog()
B) showConfirmDialog()
C) JOptionDialog()
D) ConfirmDialog()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
57
Match between columns
Also called the type-ahead buffer
operand.
Also called the type-ahead buffer
cast operator.
Also called the type-ahead buffer
assignment.
Also called the type-ahead buffer
operator precedence.
Also called the type-ahead buffer
garbage value.
Also called the type-ahead buffer
primitive type.
Also called the type-ahead buffer
float.
Also called the type-ahead buffer
boolean
Also called the type-ahead buffer
escape sequence
Also called the type-ahead buffer
primitive type
Also called the type-ahead buffer
blank final
Also called the type-ahead buffer
parse
Also called the type-ahead buffer
promotion
Also called the type-ahead buffer
keyboard buffer
Also called the type-ahead buffer
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
58
Match between columns
A programming term for an unknown value
operand.
A programming term for an unknown value
cast operator.
A programming term for an unknown value
assignment.
A programming term for an unknown value
operator precedence.
A programming term for an unknown value
garbage value.
A programming term for an unknown value
primitive type.
A programming term for an unknown value
float.
A programming term for an unknown value
boolean
A programming term for an unknown value
escape sequence
A programming term for an unknown value
primitive type
A programming term for an unknown value
blank final
A programming term for an unknown value
parse
A programming term for an unknown value
promotion
A programming term for an unknown value
keyboard buffer
A programming term for an unknown value
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
59
Match between columns
A simple data type
operand.
A simple data type
cast operator.
A simple data type
assignment.
A simple data type
operator precedence.
A simple data type
garbage value.
A simple data type
primitive type.
A simple data type
float.
A simple data type
boolean
A simple data type
escape sequence
A simple data type
primitive type
A simple data type
blank final
A simple data type
parse
A simple data type
promotion
A simple data type
keyboard buffer
A simple data type
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
60
Match between columns
true or false
operand.
true or false
cast operator.
true or false
assignment.
true or false
operator precedence.
true or false
garbage value.
true or false
primitive type.
true or false
float.
true or false
boolean
true or false
escape sequence
true or false
primitive type
true or false
blank final
true or false
parse
true or false
promotion
true or false
keyboard buffer
true or false
lvalue
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
61
Describe how the use of named constants can provide advantages over the use of literal values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
62
A variable declaration is a statement that reserves a named memory location. It includes what four elements?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
63
import javax.swing.JOptionPane;
public class salesJune
{
    public static void main(String[] args)
    {
       int storeSales = 250;
    }
}
In the above code, complete the statement that will display a message dialog box that will appear centered on the screen and will display the following text:
Congratulations! June sales were $250!
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
64
Describe and give an example of operator precedence.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
65
Write the statement that will declare a char data type named testScore that will hold a letter grade of your choice.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
66
final int COSTPERITEM = 10;
double sales2012 = amtSold * COSTPERITEM;
In the above statements, identify the named constant and describe how a programmer can recognize named constants.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
67
What is an escape sequence and why would a Java programmer use it to store a character?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
68
What is the difference between the float data type and the double data type?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
69
Describe how the Scanner class works with the System.in object in order to provide flexibility. Provide an example of using the Scanner class with System.in.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
70
Describe three ways in which a named constant differs from a variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
71
How would you ask the user to confirm an action using a dialog box?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
72
Write the statement to declare an uninitialized integer value for salesAmt . Then write the statement to declare a constant named SALESAMT with a value of 20.99.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
73
Write the statement that will declare and assign two integer variables, salesAmt and costAmt , in a single statement. Assign values of your choice to the variables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
74
Describe how to use the boolean data type. Show two examples of a boolean variable assignment; one that uses true or false and one that uses a relational operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
75
How can you create and use an input dialog box in Java?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
76
Explain how you can override a unifying type imposed by Java. Show an example.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
77
Define an integer and then list and describe the four integer data data types.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
78
In Java, how is it possible to perform mathematical operations on operands with unlike types?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
79
Describe why it is important to assign an appropriate data type to variables in an application.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
80
100 = salesAmount;
In terms of assignment operators, why is the above statement illegal?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 81 في هذه المجموعة.