+ 1

What is meant by coercion?

I want explanation with example..

22nd Feb 2017, 4:41 PM
Arghyadeep Ghosh
Arghyadeep Ghosh - avatar
2 Antworten
+ 7
Java: int i = (float) (7/3.0); converts an integer up to a double for the division and will then cast it to a float before saving it in the variable i.
22nd Feb 2017, 5:10 PM
Tashi N
Tashi N - avatar
22nd Feb 2017, 5:05 PM
Tashi N
Tashi N - avatar