Technical Writing for Success
3rd EditionDarlene Smith-Worthington, Sue Jefferson
468 solutions
Edge Reading, Writing and Language: Level C
David W. Moore, Deborah Short, Michael W. Smith
304 solutions
Technical Writing for Success
3rd EditionDarlene Smith-Worthington, Sue Jefferson
468 solutions
Technical Writing for Success
3rd EditionDarlene Smith-Worthington, Sue Jefferson
468 solutions
_________ plus __________ plus _________ equals __________.
a. Total deposits, loans, required reserves, excess reserves.
b. Loans, required reserves, excess reserves, total deposits.
c. Required reserves, total deposits, excess reserves, loans.
d. Excess reserves, loans, total deposits, required reserves.
Sets with similar terms
A program written in _______________ is the most basic circuitry-level language.
machine language
___________________ describes the feature of languages that allows the same word to be interpreted correctly in different situations based on the context.
Polymorphism
A (n) ___________ defines the circumstances under which a class can be accessed and the other classes that have the right to use a class.
assess specifier
In Java, the reserved keyword ______________ means that a method is accessible and useable even though no objects of the class exist.
static
In a _______________ environment, you can change directories using the cd command. For example, to change to a directory named MyClasses, you type cd MyClasses and press Enter.
DOS
Whenever a method requires multiple arguments, the arguments are always separated with __________________
commas
If a compiler detects a violation of language rules, it refuses to translate the class to __________________
machine code
A _______________ is an error not detected until the program asks the computer to do something wrong, or even illegal, while executing.
run-time error
It is a tradition among programmers that the first program you write in any langue produces "____________" as its output.
Hello, world?
When you run a Java application using the _______________ command, do not add the .class extension to the filename.
java
If you receive an error that states, "Exception in thread 'main' java.lang.NoClassDegFoundError," when you try to execute the application, you probably do not have your _______________ set correctly.
class path
{
public static void main(String[] args)
{
System.out.println("First Java application");
}
}
Given the above code, which item identifies the access specifier?
public
public class First
{
public static void main(String[] args)
{
System.out.println("First Java application");
}
}
Given the
above code, which item identifies the name of the class?
First
public class First
{
public static void main(String[] args)
{
System.out.println("First Java application");
}
}
Given the above code, which item identifies that the method will work without instantiating an object of the class?
static
ch = inFile.next( ) .charAt ( );
while (inFile.hasNext ( ) )
{
System.out.println(ch);
ch = inFile.next( ) . charAt ( );
}
The above code is an example of a(n) _________ loop
EOF-controlled
1, 1, 2, 3, 5, 8, 13, 21, , .....
What is the TENTH Fibonacci number in the sequence above?
55
int i;
for (i =
0; i <= 10; i++)
System.out.println("*");
System.out.println("!");
Which of the following is the initial expression in the for loop above?
i = 0;
int i;
for (i = 0; i <= 10; i++)
System.out.println("*");
System.out.println("!");
Which of the following is the update expression in the for loop above?
i++;
int x = 27;
int y = 10;
do
x = x / 3;
while (x >= y);
How many times does the statement above execute?
once
int x = 27;
int y = 10;
do
x = x / 3;
while (x >= y);
If y = 0, how many times would the loop above execute?
4
Which of the following loops is guaranteed to execute at least once?
do...while loop
Which of the following does not have an entry condition?
do...while loop
Where is the continue statement NOT usually used?
switch structures
Suppose that x is an int variable. Which of the following expressions always evaluates to false?
(x > 0) && ( x <= 0)
Based on the code above, which part of the expression is not evaluated?
2.5 >= 7 | | 4 < y
What is the value of the expression above?
True
int x;
x = (1 <= 3
&& 'K' > = 'F') ? 5 : 12
based on the code above, what is the value of x?
5
A(n) ____________ is a program module that contains a series of statements that carry out a task.
method
Data items you use in a call to a method are called ___________.
arguments
_______ is the encapsulation of method details within a class.
Implementation hiding
A(n) ________ variables is known only within the boundaries of the method.
local
When a variable ceases to exist at the end of a method, programmers say the variable ___________
goes out of scope
The arguments in a method call are often referred to as ______________.
actual parameters
Methods used with object instantiations are called _________ methods.
instance
A(n) _________ method is a method that creates and initializes class objects.
constructor
A unique identifier is most likely used as a _________ key in a database.
primary
For ease in locating class methods, many programmers store them in _______ order.
alphabetical
A(n) ______________ constructor is one that requires no arguments.
default
The name of the __________ is always the same as the name of the class whose objects it creates.
constructor
You are _____________ required to write a constructor method for a class.
never
When an application is run, the method that must be executed first must be named ____________,
main()
In order to allocate memory for an object, you use the ____________ operator.
new
Which of the following is NOT a relational operator in Java?
<>
A __________ is a named memory location that you can use to store a value.
variable
_____________ refers to the order in which values are used with operators.
associativity
A(n) _____________ variable can hold only one of two values; true or false.
boolean
The term __________ refers to the mathematical accuracy of a value.
significant digits
A ____________ data type can hold 14 or 15 significant digits of accuracy.
double
In Java, _____________ is a built-in class the provides you with the means for storing and manipulating character strings.
String
You can store any character, including nonprinting characters such as a backspace or a tab, in a(n) _______________ variable.
char
The characters _________ moves the cursor to the next line when used within a println() statement.
\n
In Java, when a numeric variable is concatenated to a String using the ______________, the entire expression becomes a String.
plus sign
The precent sign is the _____________ operator.
remainder
What is the value of result after the following statement is executed? int result = 2 + 3 * 4;
14
The ____________ is the type to which all operands in an expression are converted so that they are compatible with each other.
unifying type
Which of the following is NOT a component of a variable declaration statement?
symbolic constant
When a numeric variable is concatenate to a String, the entire expression becomes a(n) __________.
String
Which escape sequence will move the cursor to the beginning of the current line?
\r
Which of the following is a valid statement?
(i) int num = new int(67);
(ii) String name = new ("Doe");
(iii) String name = "Doe";
only (iii)
In Java, all variables declared using a class are __________.
reference variables
Which statement instructs a program to run the garbage collector?
System.gc( );
Which package is automatically imported by the Java system?
java.lang
Which of the following is the member access operator?
.
String sentence;
String str1, str2, str3, str4;
int length2;
sentence = "First exam is on Monday.";
str1 = sentence.substring (6, 12);
str2 = str1.substring (0, 4);
str3 = sentence.replace( 'i', '#');
str4 = sentence.indexOf ("on");
length2 = sentence.length ( );
Based on the code above, what is the value of str1?
exam i
String sentence;
String str1, str2, str3, str4;
int length2;
sentence = "First exam is on Monday.";
str1 = sentence.substring (6, 12);
str2 = str1.substring (0, 4);
str3 = sentence.replace( 'i', '#');
str4 = sentence.indexOf ("on");
length2 = sentence.length ( );
Based on the code above, what is the value of str2?
exam
String sentence;
String str1, str2, str3, str4;
int length2;
sentence = "First exam is on Monday.";
str1 = sentence.substring (6, 12);
str2 = str1.substring (0, 4);
str3 = sentence.replace( 'i', '#');
str4 = sentence.indexOf ("on");
length2 = sentence.length ( );
Based on the code above, what is the value of str3?
"F#rst exam #s on Monday."
String
sentence;
String str1, str2, str3, str4;
int length2;
sentence = "First exam is on Monday.";
str1 = sentence.substring (6, 12);
str2 = str1.substring (0, 4);
str3 = sentence.replace( 'i', '#');
str4 = sentence.indexOf ("on");
length2 = sentence.length ( );
Based on the code above, what is the value of str4?
14
Which of the following statements would store input in name?
name =
JOptionPane.showInputDialog("Enter your name and press OK");
int x = 0;
if (x > 0)
System.out.println("positive ");
System.out.println("zero ");
System.out.println("negative");
What is the output of the above Java code?
zero negative
int x, y;
if (x < 4)
y = 2;
else if (x >
4)
{
if (x > 7)
y = 4;
else
y = 6;
}
else
y = 8;
Based on the code above, what is the value of y if x = 4?
8
int sum = 0;
int num = 8;
if (num < 0)
sum = sum + num;
else if (num > 5)
sum = num + 15;
After this code executes, what is the value of sum?
23
counter
= 1;
while (counter < 30)
counter = 2 * counter;
what is the value of counter after the following statements execute?
32
int x = 0;
int i;
for (i = 0; i < 5; i++)
x = 3 * x + i;
What is the value of x after the following code executes?
58
public class Hello
{
public static void
main(String[ ] args)
{
______________________________________
}
}
Using the given code, write the statement in the main ( ) method body that will produce the output "Hello to all!".
System.out.println("Hello to all!");