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

Answers

Answer 1

Answer:

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

Int is not a wrapper class  

Byte is the wrapper class of byte, Int is not a wrapper class and is a primitive data type, Long is a wrapper class of long, Boolean is a wrapper class for boolean. Hence Int is the correct answer and its wrapper class is Integer.

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");

“I” in integer in A and B must be in capital.

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.

Compareto return 1 if first value is greater than with what it is compared.

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.

The radix value is 10 for decimal, 2 for binary and 16 for hexadecimal. Radix is the base or number of unique digits.

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

A. intValue ( )

B. parseInt ( )

C. toString ( )

D. compareTo ( )

ParseInt() is a static method of the integer class, and rest are non static methods.

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) ;

In A and C data type does not matches like Double c=0 means Double c=new int(0) which is never true.

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’;

Autoboxing brings out reference type from the value type, and this is not true for A  

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

a.multiply(b) = 250

a.add(b)= 250+25=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 ( )

Remainder is the correct answer.

Explanation:

Please check answer.


Related Questions

Which of the following might cause a mobility impairment that limits computer use? Select 3 options.
a color blindness
Odyslexia
O neurological issue
injury
O genetic issue

Answers

Explanation:

A color blindness , injury .

Answer:

neurological issueinjurygenetic issue

Explanation:

The question is about mobility impairment. Color blindness and dyslexia have to do with vision, so rarely cause mobility issues related to computer use. Rather they would cause issues related to reading the screen.

The remaining three choices are the ones you want.

100 POINTS PLEASE HELP Ken Thompson and Dennis Ritchie co-created which operating system?

Answers

Answer:

UNIX operating system

Explanation:

Unix is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, development starting in the 1970s at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and others.

Answer:

the UNIX

During the 1960s to 1970s, Bell Labs colleagues Ken Thompson and Dennis Ritchie developed UNIX, a multi-tasking, multi-user operating system alternative to the batch processing systems then dominating the computer industry.

Explanation:

Other Questions
Where is the Arabian Sea located on the map above?A.Letter AB.Letter BC.Letter CD.Letter D What does this event symbolize call of the wild The mean and standard deviation of a random sample of n measurements are equal to and , respectively. a. Find a % confidence interval for if n. b. Find a % confidence interval for if n. c. Find the widths of the confidence intervals found in parts a and b. What is the effect on the width of a confidence interval of quadrupling the sample size while holding the confidence coefficient fixed? Why do we study?give me reason What is the name of the colony thatmany Carolinians came from? What is the value , if any . Of philosophy in our daily lives? What does it mean to be brave? What motivates people to be brave? How did Daz finally confront his fears, and what was the result? Do you think Daz acted bravely? Why? Question 2 (1 point)Explain how you used the distribute property to find an equivalent expression for4 (3+x)ANYONE ITS WORTH 10 POINTS PLEASE??? What value of a will make the following equation true? Please help with this easy fraction problem Non example of complex fraction. The Iliad coversGreek culturethe artsa disagreement between brothersthe Trojan war what is potiential and kinetic engergy? pls someone answer my question a ship travels from savannah georgia to lisbon spain at a rate of 27.6 miles/hour. if the distance covered is 3982 miles how long did the trip take Pax Ramona Part A which statement describes the central idea of the text? what is the volume of a marble that has a mass of 3.g and a Density of 2.7 g/ml ? make sure to round to the nearest tenth Construct a line through R that is perpendicular to the line What does it represent? HELP PLS HOW DO U DO THIS A football team scored a total of 41 points in a Sunday game. They scored 7 points in the first quarter, 10 points in the second quarter, and 7 points in the third quarter. How many points did the team score in the fourth quarter?