java编程思想-第六章-某些练习题

参考https://blog.csdn.net/caroline_wendy/article/details/47271037

3

package debug;
import java.util.Arrays;

/**
 * 输出信息
 * Created by wang on 15/8/4.
 */
public class Log {
    public static void v(String[] strs) {
        System.out.println(Arrays.toString(strs));
    }
}

package debugoff;

/**
 * 不输出
 * Created by wang on 15/8/4.
 */
public class Log {
    public static void v(String[] strs) {
        System.out.println("null");
    }
}

import static debug.Log.*;
//import static debugoff.Log.*; // 无输出

/**
 * 测试输出
 * Created by wang on 15/8/4.
 */
public class TestLog {
    public static void main(String[] args) {
        v(args);
    }
}
/**
 * Output:
 * (1) null
 * (2) [My, Name, is, Girl, !]
 */

 

 

 

 

posted on 2018-05-09 22:49  lijingran  阅读(627)  评论(0编辑  收藏  举报

导航