You've defined your sayFruit() method with the package-private modifier (i.e. you've not used an access modifier like public, private or protected for it) so visibility for it is classes in the same package as your Apple class. Sub classes cannot see it unless they are in the same package too.
That's because you haven't added an access modifier to sayFruit. And by default it gets package access, which means that it's only accessible to classes in the same package - which doesn't include Main. Add public and it will work.
Edit: sorry - missed that Paul had already said that.
Joined: Jan 28, 2011
thank you. That worked.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: method in subclass not seeing method in abstract superclass