日期:2014-05-20  浏览次数:20782 次

关于在FileNotFoundException构造体的疑问
private   FileNotFoundException(String   path,   String   reason)   {
super(path   +   ((reason   ==   null)
            ?   " "
            :   "   ( "   +   reason   +   ") "));
        }
请问这个私有构造体有什么作用呢

------解决方案--------------------
This private constructor is invoked only by native I/O methods.
------解决方案--------------------
FileNotFoundException提供了public FileNotFoundException()和public FileNotFoundException(String s)两个public方法供我们用,而private FileNotFoundException(String path, String reason)这个方法指示供FileNotFoundException内部使用的。