我想知道这是什么意思?
public Settings() {
    this(null);
}
上面的代码是一个“设置”类的构造函数。this(null) 在这里是什么意思?
public Settings() {
    this(null); //this is calling the next constructor
}
public Settings(Object o) {
//  this one
}
这通常用于传递默认值,因此您可以决定使用一个构造函数或另一个..
public Person() {
    this("Name"); 
}
public Person(String name) {
    this(name,20)
}
public Person(String name, int age) {
    //...
}
    这意味着您正在调用一个重载的构造函数,该构造函数采用Object某种形式,但您不传递对象,而是传递一个普通的null.
它是一个构造函数,它调用同一个类中的另一个构造函数。
你大概有这样的事情:
public class Settings {
    public Settings() {
        this(null);  // <-- This is calling the constructor below
    }
    public Settings(object someValue) {
    }
}
通常使用这种模式,以便您可以提供具有较少参数的构造函数(以方便调用者使用),但仍将逻辑包含在一个位置(被调用的构造函数)。
它在 Settings 类中调用不同的构造函数。寻找另一个接受单个参数的构造函数。
它调用默认构造函数传递 null 作为参数...
尝试阅读Java中的重载构造函数,然后调用只有一个参数的构造函数..
.
    public Settings() {
        this(null);
    }
   public Settings(Object obj){
}   
    这Constructor Chaining在Java. 通过这个调用,您实际上调用了类对象的重载构造函数。例如
class Employee extends Person {
    public Employee() {
        this("2")  //Invoke Employee's overloaded constructor";
    }
    public Employee(String s) {
        System.out.println(s);
    }
}
    这基本上调用了与提到的每个相同的类中的另一个参数化构造函数。
这里要注意一件事,如果没有可用的参数化构造函数,它将产生错误。
我不认为将 this() 传递给 null 值。但问某人可能是一个棘手的问题。:)