Analyze the following code: public class Test { public static void main(String[] args) { System.out.println(xMethod(5, 500L)); } public static int xMethod(int n, long l) { System.out.println("int, long"); return n; } public static long xMethod(long n, long l) { System.out.println("long, long"); return n; } }

发布于 2021-02-15 03:24:31
【单选题】
A The program displays int, long followed by 5
B The program displays long, long followed by 5
C The program runs fine but displays things other than 5
D The program does not compile because the compiler cannot distinguish which xmethod to invoke

查看更多

关注者
0
被浏览
23
  • 体验AI问答!更聪明、超智能!
  • 一款基于GPT的超级AI助手,可以对话、创作、写文案!
1 个回答

撰写答案

请登录后再发布答案,点击登录

发布
问题

手机
浏览

扫码手机浏览

分享
好友

在线
客服