The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 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:

protected ..

Posted by Chin Loong on November 30, 2001 at 3:03 AM

//! Cat a = new Cat();

the constructor has protected access. change the


protected Cat()

to

public Cat()

and everything would be fine.

//! a.what();
//! b.what();

both what() methods has protected access. change both of public and everything will run fine too.

//! c.what();

this should have no problems..



Replies:

Sponsored Links



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