這些是來自github上的spring amqp樣本,在 https://github.com/SpringSource/spring-amqp-samples.git 這些是什麼類型的java構造函數?他們對於吸氣者和二傳手是否是一個短手?什麼類型的java構造函數是這些?構造函數鏈接?
public class Quote {
public Quote() {
this(null, null);
}
public Quote(Stock stock, String price) {
this(stock, price, new Date().getTime());
}
爲oppossed這一個
public class Bicycle {
public Bicycle(int startCadence, int startSpeed, int startGear) {
gear = startGear;
cadence = startCadence;
speed = startSpeed;
}
可能重複(HTTP:/ /stackoverflow.com/questions/285177/how-do-i-call-one-constructor-from-another-in-java) – 2015-03-02 12:27:26