Search:

Type: Posts; User: The_Mexican

Search: Search took 0.09 seconds.

  1. Replies
    7
    Views
    2,399

    Re: No idea what to do for this

    Uhmmmm, that's not a constructor method but sure that will work, I didn't realize you wanted it that simple lol.
  2. Replies
    7
    Views
    2,399

    Re: No idea what to do for this

    It would be:



    public class City {
    public static void main(String args[]){
    private String name;
    private int population;
    public City(String _name, int _population)
    {
  3. Replies
    7
    Views
    2,399

    Re: No idea what to do for this

    I believe what you're being asked to do is something like this:



    public City(String _name, int _population)
    {
    population = _population;
    name = _name;
    }
Results 1 to 3 of 3