nExemplos (cont.)
n
nb
= i; //
O Compilador vai indicar o erro: “Imcompatible
n // type for=. Explicit cast needed to
convert int”
n
ndouble
d = 12 + 9L + 12.3; // promoção para double dos numeros
n
nb
= (byte)i; // explícita
(coerção) ou “type cast”
ns
= i.toString(); // explícita
(coerção) por métodos
n
nf
= i; f = b; // Estas instruções apresentam
problema ?