Ask Question
4 July, 09:33

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

+4
Answers (1)
  1. 4 July, 09:52
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers