首页 > 其他 > 详细

method invocation

时间:2018-09-23 12:53:20      阅读:148      评论:0      收藏:0      [点我收藏+]
 1 package method.invocation;
 2 
 3 public class MethodInvocation {
 4     public static void main(String[] args) {
 5         boolean b = compare(10, 20);
 6         System.out.println(b);
 7     }
 8     
 9     public static boolean compare(byte a, byte b) {
10         System.out.println("byte");
11         return a == b;
12     }
13     public static boolean compare(short a, short b) {
14         System.out.println("short");
15         return a == b;
16     }
17     public static boolean compare(int a, int b) {
18         System.out.println("int");
19         return a == b;
20     }
21     public static boolean compare(long a, long b) {
22         System.out.println("long");
23         return a == b;
24     }
25 }

输出int,false。

method invocation

原文:https://www.cnblogs.com/lzp123456-/p/9692179.html

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