This marks the beginning of a multiline comment.
/*
What is used for writing output to a file?
PrintWriter
This term us used to describe variables that keep a running total of something.
Accumulating
What is an example of an escape sequence?
/n
if( firstletter != 'y' || firstletter != 'Y') System.out.println ( "ok" );
What happens?
ok will always be printed
Explain how = is different than ==.
= is a Simple assignment operator while == is Equal to.
What is used when getting input from a file?
scanner
A(n) _____ is a named storage location in a computer's memory.
Variable
What does not change the value of a variable?
count == 1
Suppose you implement a class with the header
// public class TestQuestion
The java source code for the class is stored in a file with the name:
TestQuestion.java
______ is used in a class definition when establishing an is-a relationship.
Extends
A(n) ______ is a value like 'A' or 72 that is written into the code of a program.
Literal
This term describes a loop that appears inside another loop.
Nested Loop
What should you use to compute the value that results when raising one variable to the power of another (i.e, exponentiation)?
Math.pow
How many times will the body of the loop execute?
for (int i = 1; i < 20, i++)
{
System.out.println ( i )
}
19
_____ must be used somewhere in the definition of a value-returning method.
Return
A(n) _______ is a kind of type conversion which causes an error because information may be lost.
Narrowing Conversion
This is a keyword used when declaring a variable which cannot be changed.
Final
What should you typically use if you want to continue asking the user to enter a value whenever they type a invalid input?
While
What is the term 9 in the following line of code?
int [] myArr = new int [9];
Size Declarator
The last subscript in an array list is always what?
1 less than the number of elements
What is the difference between a declaration and an assignment? Give examples.
A declaration opens up a space for a value in the computer's memory and an assignment fills it with a value.
Declaration: Int Example;
Assignment: Example = #;
The term we use when we have two methods in the same class with the same name but different parameters is ________.
Overloading
When is the use of a cast operation necessary?
When your Java class doesn't have the right data type for what you need.
How many times will the body of the loop execute?
for (int i = 1; i < 10, i++)
{
System.out.println ( i )
}
9