Thursday, May 3, 2018

Output of the program [Method overlaoding-i]

Problem statement: Output of the program !!
  1. class MethodOverloadExe {
  2. public void run(Object o) {
  3. System.out.println("object");
  4. }
  5. public void run(String o) {
  6. System.out.println("string");
  7. }
  8. }
  9. public class OverloadingExe {
  10. public static void main(String[] args) {
  11. MethodOverloadExe m = new MethodOverloadExe();
  12. m.run(null);
  13. }
  14. }
Output:
string

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...