The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

abstract class Graphics

Posted by Kishori Sharan on January 23, 2001 at 1:08 PM

static void main(String args[]){
three th= new three();
one a;
th.display(a);
in the above code you are using a in th.display(a), but before that line you haven't put any reference in a. In one a; you have just declared that a will hold a reference to an object of class one or its descendatant. But, in one a; a doesn't hold any reference. So , you must write something like a = ... before you say th.display(a) , because th.display the actual reference stored in a .



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us