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;
16 Cards in this Set
- Front
- Back
A(n) __________ begins the body of every method, and a(n) _________ ends the body of every method.
|
left brace, right brace
|
|
_________ begins an end-of-line comment
|
//
|
|
You can use the _________ statement to make decisions
|
if
|
|
_________, _________ and _________ are called white space.
|
space characters, new lines, tabs
|
|
_________ are reserved for use by Java
|
Keywords
|
|
Java applications begin execution at method _________.
|
main
|
|
Methods ________,________ and _________ display information in a command window
|
System.out.print, System.out.println, System.out.printf
|
|
T/F: Comments cause the computer to print the text after the // on the screen when the program executes
|
False, Comments do not cause any vacation to be performed when the program executes. They're used to document programs and improve readability.
|
|
T/F: All variables must be given a type when they're declared.
|
True
|
|
T/F: Java considers the variables number and NuMbEr to be identical.
|
False. Java is case sensitive, so these variables are distinct.
|
|
T/F: The remainder operator (%) can be used only with integer operands.
|
False. The remainder operator can also be used with non integer operations in Java.
|
|
T/F: The arithmetic operators *, /, %, + and - all have the same level of precedence.
|
False. the operators *, / and %'are higher precedence than operators + and -.
|
|
Declare variables c, thisIsAVariable, q76354, and number to be of type int.
|
into c, thisIsAVariable, q76354, number;
or int c; int thisIsAVariable; int q76354; int number; |
|
Prompt a user to enter can integer
|
System.out.print("Enter an Integer: ");
|
|
Input an integer and assign the result to int variable value. Assume Scanner variable input can be used to read a value from the keyboard.
|
value = input.nextInt();
|
|
Print "This is a java program" on one line in the command menu. Use method System.out.println.
|
System.out.println("This is a java Program");
|