Uhmmmm, that's not a constructor method but sure that will work, I didn't realize you wanted it that simple lol.
Type: Posts; User: The_Mexican
Uhmmmm, that's not a constructor method but sure that will work, I didn't realize you wanted it that simple lol.
It would be:
public class City {
public static void main(String args[]){
private String name;
private int population;
public City(String _name, int _population)
{
I believe what you're being asked to do is something like this:
public City(String _name, int _population)
{
population = _population;
name = _name;
}