How to populate a constructor with user input in Java?
问题 I've hit a wall on an assignment and have been combing the site for anything helpful (came up empty). I'm required to create a class, a constructor within that class, and then a subclass to extend the superclass. Then, I'm required to create a new file with a main method to demonstrate both cases. No problem, conceptually. My question is this: how do I initialize an object using the constructor, but with user input? Right now the error I'm getting is: "constructor CarRental in class CarRental