首页 > 其他 > 详细

一个网友遇到的重载问题

时间:2019-03-25 13:37:22      阅读:152      评论:0      收藏:0      [点我收藏+]

public static void main(String[] args){
  int c=add(5, 6);
  System.out.println(c);
  add(new Integer(6),new Integer(7));
}
public static int add(int a,int b){
  return a+b;
}
public static void add(Integer a,Integer b){
  System.out.println(a+b);
}

一个网友遇到的重载问题

原文:https://www.cnblogs.com/li19941999/p/10593004.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!