Voorbeeld

public static void main (String[] args){
double x = 3.1;
int i = (int)x;
System.out.println(i);
}

Oplossing
Geeft het onderliggende gegevenstype een lagere precisie.

public static void main (String[] args){
int i = 3;
System.out.println(i);
}

Oplossing
Werk de berekening zo bij dat deze op het gegevenstype met hogere precisie van toepassing is.

public static void main (String[] args){
double x = 3.1;
System.out.println( x );
}