package com.pbh.util;
public class QueryThreadUtil {
/**
* Don't let anyone instantiate this class.
*/
private QueryThreadUtil(){
throw new Error("QueryThreadUtil是个工具类,不可实例化,不可继承");
}
}
QueryThreadUtil qt = new QueryThreadUtil();
运行时报错
其他类继承QueryThreadUtil 编译不通过 提示父类必须有显示的构造方法
原文:http://blog.csdn.net/hehexiaoyou/article/details/23756077