Exam 2: Using Data

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

How could you alter the following statement to display "Welcome" on one line and "back" on another line? Show two possible solutions. System.out.println("Welcome back");

(Essay)
4.8/5
(73)

Even if a statement occupies multiple lines, the statement is not complete until the semicolon is reached.

(True/False)
4.7/5
(75)

The expression   boolean isTenLarger = (10 will produce a value of true .

(True/False)
4.8/5
(71)

The characters ____ move the cursor to the next line when used within a println() statement.

(Multiple Choice)
4.8/5
(78)

Describe why it is important to assign an appropriate data type to variables in an application.

(Essay)
4.9/5
(76)

A ____ is a named memory location that you can use to store a value.

(Multiple Choice)
4.9/5
(83)

You use ____ operators to perform calculations with values in your programs.

(Multiple Choice)
4.7/5
(74)

When a numeric variable is concatenated to a String , the entire expression becomes a(n) ____ .

(Multiple Choice)
4.8/5
(77)

How would you ask the user to confirm an action using a dialog box?

(Essay)
4.9/5
(73)

A ____ data type can hold 14 or 15 significant digits of accuracy.

(Multiple Choice)
4.9/5
(73)

Which escape sequence will move the cursor to the beginning of the current line?

(Multiple Choice)
4.8/5
(87)

The term ____ refers to the mathematical accuracy of a value.

(Multiple Choice)
4.9/5
(60)

In Java, you use variables of type ____ to store integers, or whole numbers.

(Multiple Choice)
4.9/5
(79)

import javax.swing.JOptionPane; public class salesJune {     public static void main(String[] args)     { int storeSales = 250;     } } In the above code, complete the statement that will display a message dialog box that will appear centered on the screen and will display the following text: Congratulations! June sales were $250!

(Essay)
4.8/5
(90)

You may declare an unlimited number of variables in a statement as long as the variables are ____.

(Multiple Choice)
4.8/5
(82)

Write the statement that will declare and assign two integer variables, salesAmt and costAmt , in a single statement. Assign values of your choice to the variables.

(Short Answer)
4.9/5
(84)

Multiplication, division, and remainder always take place after addition or subtraction in an expression.

(True/False)
4.8/5
(82)

The int data type is the most commonly used integer type.

(True/False)
4.9/5
(78)

The byte and short data types occupy less memory and can hold only smaller values.

(True/False)
4.9/5
(78)

In Java, when a numeric variable is concatenated to a String using the ____, the entire expression becomes a String .

(Multiple Choice)
4.8/5
(88)
Showing 21 - 40 of 67
close modal

Filters

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