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


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

Re: Need help with a program.

From Leif Roar Moldskred <leifm@dimnakorr.com>
Subject Re: Need help with a program.
Newsgroups comp.lang.java.programmer
References (1 earlier) <Rp-dnfT58e_Vm6_NnZ2dnUVZ8kydnZ2d@giganews.com> <8fc96fef-1eb1-41bb-a5d2-619ce71f5101@googlegroups.com> <ALednd5HHvkJk6_NnZ2dnUVZ8iadnZ2d@giganews.com> <ba00e484-489c-4b6b-af25-f1f6a0ebca54@googlegroups.com> <k0tho0$g4g$1@news.albasani.net>
Message-ID <2YCdnf385fmk167NnZ2dnUVZ8jKdnZ2d@giganews.com> (permalink)
Date 2012-08-21 03:43 -0500

Show all headers | View raw


Lew <noone@lewscanon.com> wrote:
> 
> Variables are not overridden, but methods can be.
> 
> All six variables in your question are 'static', meaning they belong to the 
> class rather than the instance. The variables in the subclass "hide" (not 
> "shadow") the declarations from the superclass.

Whoops. Yes, my bad -- I overlooked that the variables were static.

> [SNIP]
> The advice upthread to look up "shadowing", albeit the wrong concept, was not 
> so far wrong that it wouldn't have led to the right concept, had you not 
> summarily rejected it.

I think you're being a little too harsh here. Didn't look to me like
they "summarily rejected" anything; they just didn't understand how it
applied. These concepts can be tricky to get one's head around when
one first starts out.

-- 
Leif Roar Moldskred

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


Thread

Need help with a program. yanamandra <venu.yanamandra@gmail.com> - 2012-08-20 02:24 -0700
  Re: Need help with a program. Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-08-20 04:41 -0500
    Re: Need help with a program. yanamandra <venu.yanamandra@gmail.com> - 2012-08-20 02:57 -0700
      Re: Need help with a program. Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-08-20 05:16 -0500
        Re: Need help with a program. yanamandra <venu.yanamandra@gmail.com> - 2012-08-20 03:39 -0700
          Re: Need help with a program. Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-08-20 06:46 -0500
            Re: Need help with a program. yanamandra <venu.yanamandra@gmail.com> - 2012-08-20 04:58 -0700
          Re: Need help with a program. Lew <noone@lewscanon.com> - 2012-08-20 07:31 -0700
            Re: Need help with a program. Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-08-21 03:43 -0500
  Re: Need help with a program. Roedy Green <see_website@mindprod.com.invalid> - 2012-08-20 17:22 -0700

csiph-web