Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #6849

Re: A question about a few variables in a class

Date 2011-08-07 05:28 -0700
From Patricia Shanahan <pats@acm.org>
Newsgroups comp.lang.java.programmer
Subject Re: A question about a few variables in a class
References <c5422014-46bd-4c77-9302-839b5cb587a2@a2g2000prf.googlegroups.com> <2aas37dnmdjrkiqmgk2d1mfeblobpbdqdc@4ax.com>
Message-ID <wr2dnZWIAcxgGaPTnZ2dnUVZ_rednZ2d@earthlink.com> (permalink)

Show all headers | View raw


On 8/6/2011 10:58 PM, Roedy Green wrote:
> On Fri, 5 Aug 2011 14:31:30 -0700 (PDT), Chad<cdalten@gmail.com>
> wrote, quoted or indirectly quoted someone who said :
>
>> Are 'width' and 'height' data fields in this class? My initial guess
>> is yes
>
> they get passed to super.  Most likely the super class will have some
> width and height variable with may or may not be private.  But there
> is nothingh that says super has no save the values. It might just
> display them on the console or some such, or compute an area and save
> that.
>
> To solve this mystery, you must look at the code of the superclass.

Not necessarily the code. If there are subclass accessible fields, they
should be documented in the Rectangle documentation.

If they are not documented, I would not pay any attention to their
existence even if I found out about them by reading the code, because
they might go away or change in the next version of Rectangle.

Patricia

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

A question about a few variables in a class Chad <cdalten@gmail.com> - 2011-08-05 14:31 -0700
  Re: A question about a few variables in a class markspace <-@.> - 2011-08-05 14:46 -0700
  Re: A question about a few variables in a class Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-08-06 07:56 -0400
    Re: A question about a few variables in a class Chad <cdalten@gmail.com> - 2011-08-13 10:30 -0700
      Re: A question about a few variables in a class Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-08-13 20:49 -0400
        Re: A question about a few variables in a class Chad <cdalten@gmail.com> - 2011-08-14 13:23 -0700
          Re: A question about a few variables in a class markspace <-@.> - 2011-08-14 13:52 -0700
            Re: A question about a few variables in a class Lew <lewbloch@gmail.com> - 2011-08-14 22:50 -0700
          Re: A question about a few variables in a class Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-08-14 18:04 -0400
            Re: A question about a few variables in a class Chad <cdalten@gmail.com> - 2011-08-14 17:09 -0700
              Re: A question about a few variables in a class Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-08-14 21:57 -0400
              Re: A question about a few variables in a class Lew <lewbloch@gmail.com> - 2011-08-14 22:55 -0700
          Re: A question about a few variables in a class Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-08-14 18:01 -0400
  Re: A question about a few variables in a class Roedy Green <see_website@mindprod.com.invalid> - 2011-08-06 22:58 -0700
    Re: A question about a few variables in a class Patricia Shanahan <pats@acm.org> - 2011-08-07 05:28 -0700
  Re: A question about a few variables in a class Lew <lewbloch@gmail.com> - 2011-08-10 09:14 -0700
    Re: A question about a few variables in a class Chad <cdalten@gmail.com> - 2011-08-13 10:27 -0700
  Re: A question about a few variables in a class Patricia Shanahan <pats@acm.org> - 2011-08-14 18:36 -0700

csiph-web