Respuesta :
Answer:
The explanation of this question is given below in explanation section. However the correct option to this question is D.
Explanation:
The code and its explanation is given below:
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
public class Test {
public static void main(String[] args) {
IntegerProperty d1 = new SimpleIntegerProperty(1);
IntegerProperty d2 = new SimpleIntegerProperty(2);
d1.bind(d2);
System.out.print("d1 is " + d1.getValue()
+ " and d2 is " + d2.getValue());
d2.setValue(3);
System.out.println(", d1 is " + d1.getValue()
+ " and d2 is " + d2.getValue());
}
}
The output of this code is :
d1 is 2 and d2 is 2, d1 is 3 and d2 is 3
The value of d1 is 1 and d2 is 2. After the method d1.bind(). The value of d1 and d2 become 2 and after calling the method d2.setvalue(3) change the value of d1 and d2 to 3.
