Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Java True or False question and multiple choice : ___1. Given a decimal number,

ID: 3934626 • Letter: J

Question

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

Explanation / Answer

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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote