How JVM finds method (parameter with the closest matching) to call in case of function overloading

后端 未结 6 1582
耶瑟儿~
耶瑟儿~ 2020-12-15 22:56

The JVM decides which overloaded method to call at compile time. I have one example:

public class MainClass{

  public static void go(Long n) {System.out.pr         


        
6条回答
  •  半阙折子戏
    2020-12-15 23:15

    The video below clearly explains the way how the JVM select one method among various eligible methods in the case of method overloading.

    https://www.youtube.com/watch?v=P4XtP1aeI3g

提交回复
热议问题