Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
33 Cards in this Set
- Front
- Back
What is: "public class Name"? |
The class header |
|
What marks the beginning of a class definition? |
The class header |
|
Can you have more than one public class per Java file? |
No. But you can have more than one class. |
|
What goes between the two braces {} in a class? |
The body of the class |
|
public static void main (String [] args) is an example of what? |
A method header |
|
What marks the beginning of a method? |
The method header |
|
What is a sentence or word between two "s? |
A string literal |
|
What marks the end of a statement in Java? |
A semicolon |
|
What is System in System.out.println()? What is out? What is println? |
System is a class, out is an object of the system class, println() is a method is the out object |
|
What is the value inside of a SOP statement's parentheses called? |
An argument |
|
What starts with the backslash character and is followed by one or more control characters? |
An escape sequence |
|
What allows the user to control the way output is displayed by embedding commands within the string itself? |
A control character |
|
What is: int value; |
A variable declaration |
|
What is value = 5; |
The assignment statement. |
|
What is known as the string concatenation operator? |
It appends one string to another or one string to a variable. |
|
What type of program allows the user to get an understanding of what the program is doing by just reading its code? |
Self-documenting programs |
|
What are the rules for identifiers? |
The first character must be 'a-z', 'A-Z', _, or $. You can't use special characters aside from $ or _. You cannot include spaces. |
|
What data types cannot be used to create objects and can only hold a single value? |
Primitive data types |
|
What are examples of arithmetic operators? |
+, -, *, /, % |
|
Unary, binary, and ternary are three types of what? |
Three types of operators. |
|
What is the negation operator? |
The - in a negative number (-5) |
|
What happens when both operands of the division operator are integers? |
It will perform integer division, truncating the remainder. |
|
What does the Math.pow(x, y) do? |
It uses the value of x to the exponent that is y. |
|
What does the Math.sqrt(x.x) method do? |
It gets the square root of a double. |
|
What are examples of combined assignment operators, also known as compound operators? |
+=, -=, *=, /=, %= |
|
What lets you manually convert a value, even if it means that a narrowing conversion occurs? |
A cast operator (short)bigNum; |
|
What converts the lower-ranked data stores to the higher-ranked data type in assignment statements where values of lower-ranked data types are stored in variables of higher-ranked data types? |
A widening conversation |
|
What converts the higher-ranked data stores to the lower-ranked data type in assignment statements where values of higher-ranked data types are stored in variables of lower-ranked data types? |
A narrowing conversion. Java does not automatically do this because of data loss |
|
What is a variable whose value is read only and cannot be changed during the program's execution? What keyword is used? |
A named constant using the final keyword. |
|
What is it when one data type variable holds the actual data items with which they are associated while another data type holds the memory stress of an object. |
The difference primitive type variables and class type variables |
|
What is the part of the program where the variable may be accessed by its name? |
Its scope |
|
What statement tells the Java compiler where in the Java library to find the scanner class? |
The import statement |
|
What is a small graphical window that displays a message to the user or requests input? |
A dialog box |