主类型过载——《Thinking in Java》随笔002

package cn.skyfffire;

/**
 * 
 * @author skyfffire
 *
 */
public class Test {
//    void fun1() {
//        System.out.println("调用无返回值的方法");
//    }
//    
//    int fun1() {
//        System.out.println("调用有返回值的方法");
//        
//        return 0;
//    }
    
    public static void main(String[] args) {
        System.out.println("由于编译器无法识别究竟调用哪一个方法,所以返回值不支持过载");
    }
}
原文地址:https://www.cnblogs.com/skyfffire/p/6444209.html