Suppose a reference variable of type Double called myDouble has already been declared. There is also a double variable x that has been declared and initialized. Create an object of type Double with the initial value of x and assign it to the reference variable myDouble.

Respuesta :

alimir

Answer:

Double newMyDouble = new Double(x);

myDouble = newMyDouble2;

Explanation:

Here the new object newMyDouble is firstly the initial value of said 'double x'. In the second line myDouble is the reassigned the the newMyDouble, which is in fact, the value of x. This exercise helps you understand the syntax of using reference variables in JAVA and their assignment along with reassignment.

Q&A Education