The java.lang.Number and its subclasses are introduced in Chapter 11 . Analyze the following code.
```Number numberRef = new Integer(0);
Double doubleRef = (Double)numberRef;```
Which of the following statements is correct?
a. There is no such class named Integer. You should use the class Int.
b. The compiler detects that numberRef is not an instance of Double.
c. A runtime class casting exception occurs, since numberRef is not an instance of Double.
d. The program runs fine, since Integer is a subclass of Double.
e. You can convert an int to double, so you can cast an Integer instance to a Double instance.
c
You might also like to view...
An Excel template has an .xlxb extension
Indicate whether the statement is true or false
Enables you to copy the contents of a cell or cell range or to continue a sequence by dragging the fill handle over an adjacent cell or range of cells.
What will be an ideal response?
Determine the monthly payment for the loan described below. Use table 4-6 (amortization table formula) from your textbook. Round your answer to the nearest cent. Cost of house: $111,000Interest Rate: 6%Term: 15 yearsThe monthly payment is $__________.
Fill in the blank(s) with the appropriate word(s).
Kerning is less useful for large headlines than it is for body copy because larger text seldom requires kerning.
Answer the following statement true (T) or false (F)