W3School TIY Editor

  • W3School 在线教程
  • 改变方向
  • 暗黑模式
​x
 
public class Main {
  public static void main(String[] args) {
    int myInt = 9;
    double myDouble = myInt; // 自动类型转换:int 转 double
​
    System.out.println(myInt);
    System.out.println(myDouble);
  }
}