double int (int) / has value int (int) / has value double (double) / has value casting with operators certain binary operatorslike divisionwill have different results depending on the variable types they are used with we must take care to make sure operations perform their computations on values of the intended type when used with integersdivision does not keep track of the fractional partfor example when used with doublesdivision keeps this partas is illustrated in the following exampleint int dresult (double) (double) ;/dresult has value dresult value /dresult has notice that when and were cast to doublesregular division for real numbers was performed when and were not castthe /operator performed an integer division and the result of was the int thenjavajava then did an implicit cast to assign an int value to the double result we discuss implicit casting next implicit casting and autoboxing/unboxing there are cases where java will perform an implicit castaccording to the type of the assignment variableprovided there is no loss of precision for exampleint iresulti double dresultd dresult dcast to double /dresult is was