分析以下代码 public class Test { public static void main(String[] args) { System.out.println(m(2)); } public static int m(int num) { return num; } public static void m(int num) { System.out.println(num); } }
A.
该程序有一个编译错误,因为两个方法m具有相同的签名。
B.
该程序有一个编译错误,因为定义了第二个m方法,但未在main方法中调用它。
C.
程序运行并打印2一次。
D.
程序运行并打印2两次。
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【判断题】During the Wei, Jin, and Northern and Southern dynasties, a new style of hufu became popular.