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


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

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 04:58 -0700
Organization http://groups.google.com
Message-ID <cff66c3a-a921-43e4-8fbf-5e866e91dddb@n8g2000yqn.googlegroups.com> (permalink)
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> <gMidneib4fYUvq_NnZ2dnUVZ8lmdnZ2d@giganews.com>

Show all headers | View raw


On Aug 20, 4:46 pm, Leif Roar Moldskred <le...@dimnakorr.com> wrote:
> I'm afraid there's no way to get hold of the address or reference to a
> primitive type in Java. To confirm that these are different variables
> you have to settle for the fact that they contain different values.
>
.
.
.
>
> > Also, for the output I need, 40, 50 and 60, I will have to re-write the printall() function. Is that the only way?
>
> As long as the two i2 variables are private, the only way to solve it
> is to override the printall() method in the extended class. A better
> way to do it is to have the printall() method refer to public or
> protected getter method and then override the getter method:
>
.
.
.
> --
> Leif Roar Moldskred

Thank you Lief.

I will check that again.

-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