Assume x = 4 and y = 5. which of the following is true?

QUESTION 3

Suppose x = 4 and y = 5, which of the following statements is true?

x < 5 || and < 5 x > 5 || and > 5

x < 5 && y < 5 x > 5 && y > 5

QUESTION 14

Which of the following statements are the same?
(A) x -= x + 4
(B) x = x + 4 – x
(C) x = x – (x + 4)

(A) and (B) are identical

(B) and (C) are identical

(A) and (C) are identical

(A), (B) and (C) are identical

The default data field value of a numeric boolean type
type, the String type is ___________, respectively.

true 1 null

false 0 null

true 0 null

true 1 null

QUESTION 16

Analyze the following code:
public class test {
public static void main(String args[]) {
integer = 0;
for (i = 0; i < 10; i++); System.out.println(i + 4); } } The program compiles despite the semicolon (;) in the line of the for loop and prints 4. The program compiles despite the semicolon (;) in the line of the for loop and prints 14. The program has a compilation error due to semicolon (;) in line of for loop. The program has a runtime error due to the semicolon (;) in the loop line FOR QUESTION 17 What is printed? public class Test { public static void main(String[] args) { int j = 0; int i = ++j + j * 5; System.out.println("Who am I?" + i); } } 5 6 0 1 Suppose x = 4 and y = 5, which of the following statements is true? x < 5 || and < 5 x > 5 || and > 5

x < 5 && y < 5 x > 5 && y > 5

x < 5 || and < 5 x > 5 || and > 5

x < 5 && y < 5 x > 5 && y > 5

x < 5 || and < 5 x > 5 || and > 5

x < 5 && y < 5 x > 5 && y > 5

x < 5 || y < 5 x < 5 || and < 5 x > 5 || and > 5

x > 5 || and > 5

x < 5 && y < 5 x < 5 && y < 5 x > 5 && y > 5

x > 5 && y > 5

QUESTION 14

Which of the following statements are the same?
(A) x -= x + 4
(B) x = x + 4 – x
(C) x = x – (x + 4)

(A) and (B) are identical

(B) and (C) are identical

(A) and (C) are identical

(A), (B) and (C) are identical

(A) x -= x + 4
(B) x = x + 4 – x
(C) x = x – (x + 4)

(A) and (B) are identical

(B) and (C) are identical

(A) and (C) are identical

(A), (B) and (C) are identical

(A) and (B) are identical

(B) and (C) are identical

(A) and (C) are identical

(A), (B) and (C) are identical

(A) and (B) are identical

(A) and (B) are identical

(B) and (C) are identical

(B) and (C) are identical

(A) and (C) are identical

(A) and (C) are identical

(A), (B) and (C) are identical

(A), (B) and (C) are identical

The default data field value of a numeric boolean type
type, the String type is ___________, respectively.

true 1 null

false 0 null

true 0 null

true 1 null

true 1 null

false 0 null

true 0 null

true 1 null

true 1 null

false 0 null

true 0 null

true 1 null

true 1 null

true 1 null

false 0 null

false 0 null

true 0 null

true 0 null

true 1 null

true 1 null

QUESTION 16

Analyze the following code:
public class test {
public static void main(String args[]) {
integer = 0;
for (i = 0; i < 10; i++); System.out.println(i + 4); } } The program compiles despite the semicolon (;) in the line of the for loop and prints 4. The program compiles despite the semicolon (;) in the line of the for loop and prints 14. The program has a compilation error due to semicolon (;) in line of for loop. Program has runtime error due to semicolon (;) in loop line for public class Test { public static void main (String args[]) { int i = 0; for (i = 0; i < 10; i++); System.out.println(i + 4); } } The program compiles despite the semicolon (;) in the line of the for loop and prints 4. The program compiles despite the semicolon (;) in the line of the for loop and prints 14. The program has a compilation error due to semicolon (;) in line of for loop. The program has a runtime error due to the semicolon (;) in the line of the for loop The program compiles despite the semicolon (;) in the line of the for loop and prints 4. The program compiles despite the semicolon (;) in the line of the for loop and displays 14. The program has a compile error due to the semicolon (;) in the line of the for loop. The program has a runtime error due to the semicolon (;) in the line of the for loop The program compiles despite the semicolon (;) in the line of the for loop and prints 4. The program compiles despite the semicolon (;) in the line of the for loop and prints 4. The program compiles despite the semicolon (;) in the line of the for loop and prints 14. The program compiles despite the semicolon (;) in the line of the for loop and prints 14. The program has a compiler error because of the semicolon (;) in the line of the for loop. The program has a compilation error due to the semicolon (;) in the line of the for loop. The program has a runtime error because of the semicolon (;) in the line of the for loop The program has a runtime error because of the semicolon (;) in the line of the for loop QUESTION 17 What is printed? public class Test { public static void main(String[] args) { int j = 0; int i = ++j + j * 5; System.out.println("Who am I?" + i); } } 5 6 0 1 public class Test { public static void main(String[] args) { int j = 0; int i = ++j + j * 5; System.out.println("Who am I?" + i); } } 5 6 0 1 5 6 0 1 5 5 6 6 0 0 1 1

Answer 1

Unable to transcribe this image
QUESTION 16: In the given code int i = 0; for (1=0; i<10; it); System.out.printinl i+ 4); The program compiles despite the semicolon () in the loop as well and prints 14 if no semicolon in the tos loop is no longer pointing - с QUESTION 17: #* =) Pre-incrementing means incrementing by 1 and immediately putting ta more priority than that * then ti evaluates ++ JJ ++o) J=0; i= + + j + j*5; * more priority than in + j*5 s + 1*5 = 1 + 5 = 6 so i = 6

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *