answer : E
all classes are decalred with the default modifier so all of them are visible only within its own package
for oveloaded methods access modifier can be changed
so just one error with the implements on line 6
interface Pastry{
void getIngredients();
}
abstract class Cookie implements Pastry {
}
class ChocolateCookie implements Cookie {
public void getIngredients(){}
}
public class CoconutChocolateCookie extends ChocolateCookie {
void getIngredients(int x) {}
public static void main(String[] args){
}
}
Only E is correct
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ASPushkin
5 months, 3 weeks agoASPushkin
1 month, 2 weeks agocathDev
7 months, 2 weeks agod7bb0b2
11 months, 3 weeks agoSamps
1 year agoSamps
1 year ago[Removed]
1 year, 3 months agoOmnisumem
1 year, 3 months ago[Removed]
1 year, 4 months agoStavok
1 year, 5 months agotmuralimanohar
1 year, 6 months ago