In Java 53 Once an object is created the fields should not c

In Java:

53)  Once an object is created the fields should not change their values

A) true   B) false

54)    int x;

        x = 78;

         int y;  

         y = x > 50? 1:2;      WHat is the value of y?

A) 1   B) 2    C) cannot determine   D) 78

Solution

53)  Once an object is created the fields should not change their values

Answer: B) false

54)    int x;

        x = 78;

         int y;  

         y = x > 50? 1:2;      WHat is the value of y?

Answer: A) 1

x > 50? condition will return true so 1 will be assigned to y

In Java: 53) Once an object is created the fields should not change their values A) true B) false 54) int x; x = 78; int y; y = x > 50? 1:2; WHat is the valu

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site