The rule says that if two values have different data types, Java will automatically promote one of the values to the larger of the two data types?
In the code below, the value assigned to y is larger than the value of x. Therefore, taking the rule into consideration, the printed value should be "Float" but instead it printed "Double. Can you please why it prints Double instead of Float?
Double x = 3.21;
Float y = 4.1f;
Object o = (x*y);
System.out.println( o.getClass().getSimpleName() ); // prints out Double