subject

1. Which of the following is not the name of a Java wrapper class from the Java API? A. Byte
B. Int
C. Long
D. Boolean*

2. Which of the following statements will cause a compiler error?

A. Integer i = new integer ( ) ;*
B. Integer j = new integer ("5") ;
C. Integer k = Integer. valueOf ("5");
D. int m = Integer. pareseInt ("5");

3. If variables j and k refer to objects of type Double and j . compareTo (k) returns a value of 1, which of the following is true?

A. The double value held in j is less than the value held inside k.
B. The difference between values held in j and k is 1.*
C. The double values held inside j and k are both positive.
D. The double value held inside j is greater than the value held inside k.

4. What is a radix as used in the method parseInt (String s, int radix) from the integer class?

A. A numeric base 2 such as for binary or 16 for hexadecimal.
B. The number of characters in the string that represent integers.*
C. The Unicode character code to be used when parsing the string.
D. The number of times the string should be repeated before being converted to an int.

5. Which of the following is a static method of the integer class?

A. intValue ( )
B. parseInt ( )
C. toString ( )*
D. compareTo ( )

6. Which of the following statements will cause a compiler error?

A. Double a = new Double (10.6) + 3;
B. Integer b = 0;*
C. Double c = 0;
D. int d = new Integer (7) ;

7. Which of the following is not an example of autoboxing?

A. Boolean a = false
B. Integer b = new integer (9);
C. double x = 3.0;
Double c = x;
D. Character d = ‘2’;*

8. What is the result of the following code fragment?

BigInteger a = new BigInteger (“10”);
BigInteger b = new BigInteger (“25”);
a . multiply (b);
a . add (b);
System. out. println (a);

A. 10
B. 35
C. 250 *
D. 275

9. What is the name of the BigInteger method that will calculate the remainder of division by another BigInteger?

A. modulo ( )
B. modulus ( )*
C. divisor ( )
D. remainder ( )

the ones marked in asterisks are my answers, I'm not totally sure if they're right and would like someone to double check for me

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 19:30
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
question
Computers and Technology, 23.06.2019 22:30
What would be the address of the cell, which is at the intersection of the second row and the third column in a worksheet?
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
An npn transistor is correctly biased and turned on if the a. base is negative. b. collector is negative. c. collector is positive with respect to the emitter and negative with respect to the base. d. collector is the most positive lead followed by the base.
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
How are roger williams, james oglethorpe, and william penn similar?
Answers: 3
You know the right answer?
1. Which of the following is not the name of a Java wrapper class from the Java API? A. Byte
...
Questions
question
Mathematics, 01.12.2021 03:40
question
Health, 01.12.2021 03:40
Questions on the website: 13722361