Why does the following class does not compile? public class Weather { private int currentTemp; public Weather(int temp) { currentTemp = temp; } public void resetTemp(double newTemp) { currentTemp = newTemp; } }




© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.

© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.