just highlighting that the constructor is available in the class and hasn't been missed这个类继承自一个具有静态构造函数的接口我已经设法用下面的代码修复了这个错误 static DateTime dateTime = new DateTime();这看起来是强制地告诉它使用这个构造函数--但由于这种设置在应用程序中使用</
hashSet = new HashSet<String>();HashSet<String> hashSet = new HashSet();
有趣的是,netbeans建议不要在初始化部分中指定类型参数,而是使用菱形操作符?以及谁应该使用哪一个,这样代码就可以在不同的IDE中使用,而不会有任何改变。