0
Whats is the output?
public class Program { public static void main(String[] args) { double x = 3.6; double y = (int) x; System.out.print(y); } }
1 ответ
+ 13
3.0
(int) x is 3
After saving it as a double variable, it becomes 3.0
You can try it out by yourself using code playground.