考试
1970-01-01 08:00:00

在下面的程序中使用方法重载分别实现了两个和三个整数的相加,请

题目描述

在下面的程序中使用方法重载分别实现了两个和三个整数的相加,请将下面的程序填写完整。 class AddOver{ public (3) { return a+b; } public int add( int a, int b, int c ){ return a+b+c ; } } public class Blank2{ public static void main(String[] args){ AddOver a= (4) ; System.out.println(a.add(1,2))

答案解析

int add(int a,int b); new AddOver()

加载中...
AI正在思考中,请稍候...