Try out our new practice tests completely free! # Big Java Binder Early Objects

Computing

## Quiz 4 : Fundamental Data Types Study Flashcards  Looking for Programming Homework Help?

## Quiz 4 :Fundamental Data Types  What is the output of the following code snippet? public static void main(String[] args) { Double a; A = Math.sqrt(9.0) + Math.sqrt(16.0); System.out.println(a); }
Free
Multiple Choice

C

Tags
Choose question tag  What will be the value stored in the variable x after the execution of the following code snippet? Int a = 10; Int b = 20; Int c = 2; Int x = b / a /*c*/;
Free
Multiple Choice

B

Tags
Choose question tag  Which of the following statements is correct about constants?
Free
Multiple Choice

C

Tags
Choose question tag  What is the result of the following expression? double d = 2.5 + 4 * -1.5 - (2.5 + 4) * -1.5;
Multiple Choice
Tags
Choose question tag  What is the result of the following code snippet? public static void main(String[] args) { Double circleRadius; Double circleVolume = 22 / 7 * circleRadius * circleRadius; System.out.println(circleVolume); }
Multiple Choice
Tags
Choose question tag  What is wrong with the following code snippet? Int average; Average = 78A;
Multiple Choice
Tags
Choose question tag  Which one of the following operators computes the remainder of an integer division?
Multiple Choice
Tags
Choose question tag  ) What are the values of num1 and num2 after this snippet executes? double num1 = 4.20; Double num2 = num1 * 10 + 5.0;
Multiple Choice
Tags
Choose question tag  What is wrong with the following code? Int count = 2000 * 3000 * 4000;
Multiple Choice
Tags
Choose question tag  Which of the following guidelines will make code more explanatory for others?
Multiple Choice
Tags
Choose question tag  Assuming that the user inputs a value of 25 for the price and 10 for the discount rate in the following code snippet, what is the output? public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Enter the price: "); Double price = in.nextDouble(); System.out.print("Enter the discount rate: "); Double discount = in.nextDouble(); System.out.println("The new price is " + Price - price * (discount / 100.0)); }
Multiple Choice
Tags
Choose question tag  What is the output of the following code snippet? public static void main(String[] args) { Int value = 25; Value = value * 2; Value--; System.out.println(value); }
Multiple Choice
Tags
Choose question tag  Which of the following statements with comments is(are) valid? I. int cnt = 0; /* Set count to 0 II. int cnt = 0; /* Set count to 0 */ III. int cnt = 0; // Set count to 0
Multiple Choice
Tags
Choose question tag  What is wrong with the following code snippet? public class Area { Public static void main(String[] args) { Int width = 10; Height = 20.00; System.out.println("area = " + (width * height)); } }
Multiple Choice
Tags
Choose question tag  What is the value of Math.pow(3, 2)?
Multiple Choice
Tags
Choose question tag  What is the output of the following code snippet? public static void main(String[] args) { Int value = 3; Value++; System.out.println(value); }
Multiple Choice
Tags
Choose question tag  Which of the following options declares a float variable?
Multiple Choice
Tags
Choose question tag  What is the value inside the value variable at the end of the given code snippet? public static void main(String[] args) { Int value = 3; Value = value - 2 * value; Value++; }
Multiple Choice
Tags
Choose question tag  Which one of the following variables is assigned with valid literals?
Multiple Choice   