The moose likes Beginning Java and the fly likes Accessing abstract class variables via the implentation class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Accessing abstract class variables via the implentation class" Watch "Accessing abstract class variables via the implentation class" New topic
Author

Accessing abstract class variables via the implentation class

Chris Stabler
Greenhorn

Joined: Oct 22, 2009
Posts: 13
I have an abstract class that has a few classes and variables but i am having issues with these variables being "seen" by the implentation class.



**Implementation Class**





so my question is is that how come the implementation class cannot see a member of a class that is inside my base class? Area is just a class from the java.awt.geom class.

thanks for your help in advance.


Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 3859
    
    1

outerRing != outRing

Is it as straightforward as that, or is that a mistake in your posting?
Chris Stabler
Greenhorn

Joined: Oct 22, 2009
Posts: 13
Matthew Brown wrote:outerRing != outRing

Is it as straightforward as that, or is that a mistake in your posting?


mistake in posting - i will correct
Alex Hurtt
Ranch Hand

Joined: Oct 26, 2010
Posts: 98
shape.outRing ??
Lino Larios
Greenhorn

Joined: Jun 27, 2008
Posts: 28
Hi

Ive run the code that i can see but i can get such error.


regards
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32827
    
    4
Chris Stabler wrote:mistake in posting - i will correct
You ought to have left it unchanged; now you have changed it nobody can understand the replies.

And why have you got public fields in your classes. That looks like bad design to me.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16487
    
    2

Campbell Ritchie wrote:And why have you got public fields in your classes. That looks like bad design to me.


Likewise having classes which are for graphic type things extending Thread...
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

How do you access the member class of your super class? The implementation class can see the member class of the super class as usual like any other non-private members. Check the code below.


|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing abstract class variables via the implentation class
 
Similar Threads
Abstract methods
Override
Point-Circle-Cylinder
Shape Hierarchy
abstract class problem