+ 1
Where is my mistake in my programme
2 Respostas
+ 8
Packages are not supported here so please remove that line.
System.out.println(myDouble);
System.out.println(myInt);
In println that is small 'L' and not capital 'i'.
+ 1
public class TypeCasting {
public static void main(String[] args) {
double myDouble = 2.0462;
int myInt = (int)myDouble;
System.out.println(myDouble);
System.out.println(myInt);
}
}