programming languages Online Quiz - 325
Description: programming languages Online Quiz - 325 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
You are considering four different "if" statements for the following code: public class IsItSame { public static void main(String [] args ) { int TheAnswer = 0; IsItSame x = new IsItSame(); Object y = x; IsItSame z = new IsItSame(); if (z == x) TheAnswer = 0; if (y == x) TheAnswer = 1; if (y == z) TheAnswer = 2; if (y.equals(z) ) TheAnswer = 3: if (x.equals(z) ) TheAnswer = 4; if (z.equals(y) ) TheAnswer = 5; System.out.printIn("The answer is " + TheAnswer); } } What will be printed out once the code is compiled and executed?
which methods would prevent the execution of a thread? (Choose all that apply)
What is the purpose of the break statement?
Which of the following are appropriate ways to use assertions? (Choose all that apply) You have not made any correct choices. The correct options are as follows
you assign a value to the primitive variables x and y as indicated below. Which declaration for z must be used for this code to properly compile? byte x = 3; byte y = 2; // insert declaration for z here z = x + y;