Search:

Type: Posts; User: jim829

Search: Search took 0.12 seconds.

  1. Re: What difference does an additional constructor make to your program?

    Did you see the examples I provided? In the examples I gave it is primarily to make things more concise. If you had to always invoke multiple setters to set say 5 values it's cumbersome and...
  2. Re: What difference does an additional constructor make to your program?

    One other observation. Using getters and setters hide the implementation details of how the fields are stored. If you allow them to be set or retrieved directly, you can no longer change that in...
  3. Re: What difference does an additional constructor make to your program?

    Another reason is to permit easily using default values for one or more parameters.


    public class Square {
    private Color color;
    private int size;
    private static int SIZE = 10;
    ...
Results 1 to 3 of 3