Exam 2: Using Data

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Define an integer and then list and describe the four integer data data types.

(Essay)
4.9/5
(37)

char aCharacter = 2; int aNumber = '2'; In the above statements, what values will be output after a println() statement is executed? Why are the output results different for the two statements?

(Essay)
4.8/5
(38)

How can you create and use an input dialog box in Java?

(Essay)
4.9/5
(43)

Describe how the use of named constants can provide advantages over the use of literal values.

(Essay)
4.8/5
(34)

What is the value of result after the following statement is executed? int result = 2 + 3 * 4;

(Multiple Choice)
4.8/5
(38)

Each primitive type in Java has a corresponding class contained in the java.lang package. These classes are called ____ classes.

(Multiple Choice)
4.9/5
(35)

A variable declaration is a statement that reserves a named memory location. It includes what four elements?

(Essay)
4.7/5
(40)

final int COSTPERITEM = 10; double sales2012 = amtSold * COSTPERITEM; In the above statements, identify the named constant and describe how a programmer can recognize named constants.

(Essay)
4.9/5
(39)

In Java, how is it possible to perform mathematical operations on operands with unlike types?

(Essay)
4.8/5
(44)

What is the difference between the float data type and the double data type?

(Essay)
4.9/5
(41)

You are limited to declaring a maximum of three variables in a single statement.

(True/False)
4.8/5
(35)

Once a variable has been declared and initialized, new values may not be assigned to the variable.

(True/False)
4.9/5
(29)

____________________ forces a value of one data type to be used as a value of another type.

(Short Answer)
4.9/5
(33)

Write the statement that will declare a char data type named testScore that will hold a letter grade of your choice.

(Essay)
4.9/5
(40)

The ____ is the type to which all operands in an expression are converted so that they are compatible with each other.

(Multiple Choice)
4.8/5
(40)

Why is the following relational operator expression invalid? How could you rewrite the statement so that it is valid? boolean isGradePassing = (grade => 70);

(Essay)
4.8/5
(40)

The percent sign is the ____ operator.

(Multiple Choice)
4.9/5
(50)

A(n) ____ dialog box asks a question and provides a text field in which the user can enter a response.

(Multiple Choice)
4.8/5
(38)

Describe three ways in which a named constant differs from a variable.

(Essay)
4.9/5
(32)

A(n) ____________________ operator compares two items and the result has a Boolean value.

(Short Answer)
4.7/5
(36)
Showing 41 - 60 of 67
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)