Saturday, May 11, 2019

what will be the output of the following code?

Problem statement:
what will be the output of the following code?
  1. class ExecutionTwelve {
  2.     public void talk() {
  3.         System.out.println("I'm a ExecutionTwelve !");
  4.     }
  5. }
  6. class ExecutionThirteen extends ExecutionTwelve {
  7.     @Override
  8.     public void talk() {
  9.         System.out.println("I'm a ExecutionThirteen !");
  10.     }
  11. }
  12. public class ExecutionEleven {
  13.     public static void main(String[] args) {
  14.         ExecutionTwelve t = new ExecutionThirteen();
  15.         t.talk();
  16.     }
  17. }
Output:
I'm a ExecutionThirteen !

No comments:

Post a Comment

How to run standalone mock server on local laptop

 Please download the standalone wiremock server from Direct download section at the bottom of the page.  Download and installation Feel fre...