• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/25

Click to flip

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;

25 Cards in this Set

  • Front
  • Back

Identifier (can or cannot) start with digit.

cannot


(plus, cannot contain #, but it can start with "_")

An identifier that cannot be used as a variable name is a _____ word.

reserved (public, int, static, void)

A comment starts with what characters?

//

A location in memory used for storing data and given a name in a computer program is called a _____ because the data in the location can be changed.

variable

Before a variable is used it must be _____

declared

Declare an integer variable named degreesCelsius .


Declare a long integer variable named grossNationalProduct .

int degreesCelsius;


long grossNationalProduct;

Declare two integer variables named profitStartOfQuarter and cashFlowEndOfYear .

int profitStartOfQuarter, cashFlowEndOfYear;

Qualifying an integer declaration with "unsigned" essentially increases the maximum value of the variable by a factor of _____.

2

Write a single statement that will print the message "first is " followed by the value of first, and then a space, followed by "second = ", followed by the value of second. Print everything on one line and go to a new line after printing. Assume that first has already been declared as a double and that second has been declared as an int . Assume also that the variables have already been given values .

System.out.println("first is " + first + " second = " + second + "\n");

Declare a variable x , suitable for storing values like 3.14159 and 6.02E23.


Declare a character variable named c .

float x;


char c;

Declare a variable isACustomer suitable for representing a true or false value .

boolean isACustomer;

In literal format...


1) Optional initial sign (+ or -) and 0-9


2) begins with 0 (remaining digits must be 0-7)


3) begins with 0x (remaining digits must be 0-F)

1) int


2) octal


3) hexadecimal

Literal format...


Optional initial sign (+ or -) and terminated by an _____

F or f

Write a literal corresponding to the value of the first 6 digits of PI ("three point one four one five nine").

3.14159

In literal format, you input any printable character with _____ for character data type.

single quotes (ex. 'A')

The character escape sequence to force the cursor to go to the next line

/n

The character escape sequence to force the cursor to advance forward to the next tab setting

\t

The character escape sequence to represent a single quote

\'

The character escape sequence to represent a double quote

\"

The character escape sequence to represent a backslash

\\

String constant will need _____

""

Declare an integer constant , MONTHS_IN_YEAR , whose value is 12 .

final int MONTHS_IN_YEAR = 12;

Write an expression that computes the remainder of the variable principal when divided by the variable divisor . (Assume both are type int .)

principal % divisor

Given an integer variable bridgePlayers , write a statement that increases the value of that variable by 4 .

bridgePlayers += 4;

Given an integer variable strawsOnCamel , write a statement that uses the auto-increment operator to increase the value of that variable by 1 .

strawsOnCamel ++;