Please for java programming language Question 1 Which of the following statement
ID: 3910506 • Letter: P
Question
Please for java programming language
Question 1
Which of the following statements uses a compound assignment operator?
index = index + 1;
index++;
index += 1;
both b and c
all of the above
1 points
Question 2
Using the BigDecimal class, you can
store numbers with a maximum of 16 significant digits
avoid rounding errors that may occur otherwise in business applications
both A and B
none of the above
1 points
Question 3
If int variable x = 100, float variable y = 1.587F, and double variable z = 4.8, what does the following expression return?
x + Math.round(y) + (int) z
105
107
105.6
106
1 points
Question 4
If the double variables x = 2.5 and y = 4.0, what is the value of z after this statement is executed?
int z = (int) x + (int) y;
6.0
7
6.5
6
1 points
Question 5
You can store a value that can’t be changed as an application executes in a ____________.
1 points
Question 6
Explicit casts must be used to perform
narrowing conversions
widening conversions
any conversion between two data types
1 points
Question 7
Which of these data types are used to store numbers with decimal positions?
byte
1 points
Question 8
What is the range of values that x can hold after this statement is executed?
double x = Math.random() * 10 + 100;
100 <= x < 1100
100 <= x < 101
100 <= x < 200
100 <= x < 110
1 points
Question 9
Unlike a variable, a constant can’t
be declared with block scope
be initialized when it’s declared
be declared within a method
change in value as an application runs
1 points
Question 10
Which of the following is not a binary operator?
+
/
++
%
1 points
Question 11
If the variable named input is 755, what is the value of r after these statements are executed?
NumberFormat n = NumberFormat.getNumberInstance();
n.setMinimumFractionDigits(3);
String r = n.format(input);
.755
760.000
755.000
755
1 points
Question 12
The decrement operator is called a ____________ operator because it operates on a single operand.
a.index = index + 1;
b.index++;
c.index += 1;
d.both b and c
e.all of the above