This is the mail archive of the java-discuss@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problems with calling inherited methods


Hi,

On Sun, Jan 14, 2001 at 10:18:29AM -0500, Edgar Villanueva wrote:
> There's a problem with compiling classes that call inherited methods.
> 
> Here is a class that shows the problem.
> 
> import java.util.*;
> 
> public class MyLinkedList extends LinkedList
> {
>     public static void main(String args[])
>     {
>          MyLinkedList t = new MyLinkedList();
>          if (t.isEmpty())
>               System.out.println("list is empty");
>          else
>               System.out.println("list has something");
>     }
> }

This seems to be fixed in the latest version from CVS.
(gcc version 2.97 20010112)
The above example compiles correctly for me.
And it gives the (correct) output 'list is empty'.

Thanks,

Mark

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]