Ask Question
17 May, 12:45

Consider that the following variables have been declared: int David_Tennant; double Matt_Smith; Which of the following statements are valid. Select all that apply.

a. Integer tenth = David_Tennant;

b. (double) David_Tennant = Matt_Smith;

c. Matt_Smith = double (David_Tennant; )

d. Matt_Smith = (double) David_Tennant;

e. Matt_Smith = David_Tennant;

Double eleventh = 11.50;

David_Tennant = eleventh. intValue ();

+3
Answers (1)
  1. 17 May, 13:23
    0
    Double eleventh = 11.50;

    David_Tennant = eleventh. intValue ();

    Explanation:

    These two statements are correct. Method intValue () converts Integer to int which is is called unboxing. In this case intValue () method converting Integert part of eleventh variable then storing it in int variable David_Tennant. Output will be 11.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Consider that the following variables have been declared: int David_Tennant; double Matt_Smith; Which of the following statements are ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers