Limited access

Upgrade to access all content for this subject

Consider the following declarations.

 int quantity = 3;
 double value = 7.52;
 String number = "one";

Which of the following assignments would be valid?

A

quantity = value;

B

value = quantity;

C

number = quantity;

D

quantity = (int)number;

E

quantity = (double)value;

Select an assignment template