method invocation
Posted lzp123456-
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了method invocation相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章
java7新特性之Simplified varargs method invocation
javac之Method Invocation Expressions
Asynchronous_method_invocation 异步方法调用 让步 yielding
Invocation of destroy method failed on bean with name ‘XXXX’
Invocation of init method failed; nested exception is org.hibernate.cfg.beanvalidation.IntegrationEx
Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property报错