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
(82)

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
(82)

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

(Essay)
4.9/5
(93)

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

(Essay)
4.8/5
(71)

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

(Multiple Choice)
4.8/5
(77)

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
(76)

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

(Essay)
4.7/5
(77)

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
(81)

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

(Essay)
4.8/5
(90)

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

(Essay)
4.9/5
(87)

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

(True/False)
4.8/5
(79)

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

(True/False)
4.9/5
(71)

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

(Short Answer)
4.9/5
(70)

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

(Essay)
5.0/5
(82)

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

(Multiple Choice)
4.9/5
(77)

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
(80)

The percent sign is the ____ operator.

(Multiple Choice)
4.9/5
(94)

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
(84)

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

(Essay)
4.9/5
(73)

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

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

Filters

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