How to return object from Callable()

后端 未结 3 875
再見小時候
再見小時候 2020-12-11 17:08

I\'m trying to return a 2d array from call(), I\'m having some issues. My code so far is:

//this is the end of main   
Thread t1 = new Thread(new ArrayMultip         


        
3条回答
  •  执笔经年
    2020-12-11 17:50

    In addition to Joseph's excellent answer, note that your method signature is int[][] call(int[][]). If you reference the Callable javadoc you'll see that the Callable's call() method does not take any arguments. So your method is an overload, not an override, and so won't be called by anything that is calling Callable's call() method.

提交回复
热议问题