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


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

Re: Need help with a program.

From yanamandra <venu.yanamandra@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Need help with a program.
Date 2012-08-20 03:39 -0700
Organization http://groups.google.com
Message-ID <ba00e484-489c-4b6b-af25-f1f6a0ebca54@googlegroups.com> (permalink)
References <82bcd41c-df92-4103-b674-718cf64a999b@x8g2000yqf.googlegroups.com> <Rp-dnfT58e_Vm6_NnZ2dnUVZ8kydnZ2d@giganews.com> <8fc96fef-1eb1-41bb-a5d2-619ce71f5101@googlegroups.com> <ALednd5HHvkJk6_NnZ2dnUVZ8iadnZ2d@giganews.com>

Show all headers | View raw


On Monday, August 20, 2012 3:46:52 PM UTC+5:30, Leif Roar Moldskred wrote:
> yanamandra wrote: > > I am talking about inherited variables. there is i1, i2 and i3 in > the super class with a method printall. there are the same 3 > variables in the derived class but there is no printall method in > the sub class. No, those are three _different_ variables which happen to have the same names as variables in the base class. You have _six_ variables in play here, not three. That's what's causing you problems. -- Leif Roar Moldskred

Yes, as per the output, it looks like that. But, where can I confirm that all three are different variables? Can I print addresses of the 3 variables, or is there any utility in java that can print the output similar to "nm"?

Also, for the output I need, 40, 50 and 60, I will have to re-write the printall() function. Is that the only way?

-Venu

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