class Foo { public static void main (String[] args) { double x = 10; // 10→10.0と暗黙に型変換 int y = 3.45; // これはコンパイルエラー } }