Java: Getters, Setters, and Constructor
问题 I'm trying to Create a class that holds a location,Including the following methods: Setters (mutators) for each of the data fields For the location name, you should use the trim() method to remove any leading or trailing blank spaces. Getters (accessors) for each of the data fields Constructor: You should have only one constructor that takes the place name, the latitude, and the longitude. You may expect that the data will be valid, although the strings may need to be trimmed. public class