Exam 4: Fundamental Data Types

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

What is the output of the following code snippet? What is the output of the following code snippet?

(Multiple Choice)
4.9/5
(30)

What is the result of the following expression? double d = 2.5 + 4 * -1.5 - (2.5 + 4) * -1.5;

(Multiple Choice)
4.8/5
(40)

Which statements about numeric types in Java are true? I.There is more than one integer type II.The data type float uses twice the storage of double III.The numeric range of the Java integer type is related to powers of two

(Multiple Choice)
4.7/5
(35)

What is the output of the following code snippet? What is the output of the following code snippet?

(Multiple Choice)
4.8/5
(41)

What does the following statement sequence print if the user input is 123? What does the following statement sequence print if the user input is 123?

(Multiple Choice)
4.9/5
(38)

Consider the following Java variable names: I.1stInstance II.basicInt% III.empName_ IV.addressLine1 V.DISCOUNT Which of the following options is correct?

(Multiple Choice)
4.7/5
(40)

Which one of the following reserved words is used in Java to represent a value without a fractional part?

(Multiple Choice)
4.9/5
(37)

Which of the following is the Java equivalent of the following mathematical expression? Which of the following is the Java equivalent of the following mathematical expression?

(Multiple Choice)
4.8/5
(43)

Which one of the following types of statements is an instruction to set the value of a variable?

(Multiple Choice)
4.7/5
(36)

What is the output of the following code snippet? What is the output of the following code snippet?

(Multiple Choice)
4.8/5
(43)

What does the following statement sequence print if the user input is 123? What does the following statement sequence print if the user input is 123?

(Multiple Choice)
4.8/5
(46)

Which is a legal number literal of type int in Java?

(Multiple Choice)
4.9/5
(40)

What is the output of the following code snippet? What is the output of the following code snippet?

(Multiple Choice)
4.8/5
(35)

What is the value of Math.pow(2, 3)?

(Multiple Choice)
4.8/5
(39)

Which one of the following is an assignment statement?

(Multiple Choice)
4.9/5
(39)

Which is a correct representation of the given mathematical expression in Java? Which is a correct representation of the given mathematical expression in Java?

(Multiple Choice)
4.9/5
(40)

What is the output of this code snippet? double average; int grade1 =87; int grade2 =94; / / system. out. print("The average is " +(grade1+grade2) / 2.0) ; System.out.print("The average is " + average);

(Multiple Choice)
4.8/5
(32)

Which option represents the best choice for a variable name to represent the average grade of students on an exam?

(Multiple Choice)
4.8/5
(42)

A student's class average can be computed by dividing the number of marks they have earned by the number of marks possible.Assume the following variables have been declared as shown and given values elsewhere: int marksEarned, marksPossible; double classPercentage; Which of the following statements will assign the correct percentage average to classPercentage? For example, if marksEarned is 725 and marksPossible is 1000, classPercentage should be assigned the value 72.5.

(Multiple Choice)
4.8/5
(28)

Which of the following statements about constants is correct?

(Multiple Choice)
4.8/5
(44)
Showing 61 - 80 of 124
close modal

Filters

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