运行 ❯
获取
自己的 Java
服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
public class Main { static int plusMethodInt(int x, int y) { return x + y; } static double plusMethodDouble(double x, double y) { return x + y; } public static void main(String[] args) { int myNum1 = plusMethodInt(8, 5); double myNum2 = plusMethodDouble(4.3, 6.26); System.out.println("int: " + myNum1); System.out.println("double: " + myNum2); } }
int: 13
double: 10.559999999999999