Problem statement:
what will be the output of the following code?
what will be the output of the following code?
- class ExecutionTwelve {
- public void talk() {
- System.out.println("I'm a ExecutionTwelve !");
- }
- }
- class ExecutionThirteen extends ExecutionTwelve {
- @Override
- public void talk() {
- System.out.println("I'm a ExecutionThirteen !");
- }
- }
- public class ExecutionEleven {
- public static void main(String[] args) {
- ExecutionTwelve t = new ExecutionThirteen();
- t.talk();
- }
- }
Output:
I'm a ExecutionThirteen !
No comments:
Post a Comment