Java - Inheritance
What will be the output of the following code?
final class Fruit {
void taste() { System.out.println("Sweet"); }
}
class Apple extends Fruit {
void taste() { System.out.println("Sour"); }
}
public class Test {
public static void main(String[] args) {
Apple a = new Apple();
a.taste();
}
}