The Artima Developer Community
Sponsored Link

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

Don't use "extends"

Posted by Ivan Villanueva on June 15, 2001 at 10:55 AM

Hola Javier,

if you want to use in a class objects of other class, you don't need to use the "extends" keyword. In the second class you can use variables like:
A a1 = new A() ;
A a2 = new A() ;
...
Or you can use an array like:
A[] aArray = new A[2] ;
aArray[0] = new A() ;
aArray[1] = new A() ;

Hasta la vista
Ivan Villanueva



Replies:

Sponsored Links



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