Isn't double[][] equivalent to **double?

前端 未结 9 1391
心在旅途
心在旅途 2020-12-29 02:37

I\'m asking this because my program have two functions to multiply matrices, they multiply only 4x4 and 4x1 matrices. The headers are:

 double** mult4x1(doub         


        
9条回答
  •  时光说笑
    2020-12-29 02:51

    Another difference is that you can not make double to point to any other memory address if you declare it as double[][] ( Something like final field )

    But if you declare it as **double, then it can point to any memory location.

提交回复
热议问题