Weather Forecast

Java Spring Components Language features Public New



Consider the following two classes:

public class WeatherForecastService {

    private Thermometer thermometer;

    public WeatherForecastService(Thermometer thermometer) {
        this.thermometer = thermometer;

    @Scheduled(fixedDelay = 10000)
    public void takeTemperatureMeasurement() {

public class FakeThermometer implements Thermometer {

    public int measure() { return 10; };

Supposing Spring uses component scanning to discover beans, select all of the statements that are correct.

(multiple correct answers possible)