This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
This is my first post to this forum. I have started preparing for SCJP recently and I am totaly confused with the following code.
Can't find an answer by myself.
Fruit.java is in a package foo.
public class Fruit
protected void k()
And implementing class Apple is having default access.
class Apple extends Fruit
public static void main(String a)
Fruit b = new Apple();///Code fails to compile...If the new Apple object is assigned to a Apple b object then it runs fine...
What am I missing here? Thanks...
Joined: Aug 15, 2011
I think this is not the correct place to ask this question.
I have posted it in the Beginning Java forum. Thanks...