Java True or False question and multiple choice 1 Given a d

Java True or False question and multiple choice :

___1. Given a decimal number, the method format of the class DecimalFormat returns a string containing the digits of the number formatted. True or False

___2. The value of a variable cannot change during program execution. True or False

___3. The expression !(x < 0) is true only if x is a positive number. True or False

Multiple choice

___4. Which of the following has the highest value?

A. \'+\' B.\' * \' C.\'R\' D.\'a\'

___5. The showMessageDialog method takes ____ parameters.

A. 1 B.2,4 or 5 C.None D.3 or 6

___6. Suppose x and y are int variables. Consider the following statements.

if (x > 5) {

y = 1;

} else if (x < 5) {

if (x < 3) {

y = 2;

} else {

y = 3;

}

} else {

y = 4;

}

What is the value y if x = 3?

A.1 B.2 C. 3 D.4

Solution

1) true

2)false , their might be manipulation done on variable value

3)true because x<0 is false which on negation becomes true

4) D. \'a\'

5) B. 2,4 or 5

6) C. 3

Java True or False question and multiple choice : ___1. Given a decimal number, the method format of the class DecimalFormat returns a string containing the dig

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site