what type of java constructors are these? Constructor chaining?
-
27-04-2021 - |
Question
These are from the spring amqp samples on github at https://github.com/SpringSource/spring-amqp-samples.git what type of java constructors are these? are they a short hand for getters and setters?
public class Quote {
public Quote() {
this(null, null);
}
public Quote(Stock stock, String price) {
this(stock, price, new Date().getTime());
}
as oppossed to this one
public class Bicycle {
public Bicycle(int startCadence, int startSpeed, int startGear) {
gear = startGear;
cadence = startCadence;
speed = startSpeed;
}
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow