Why does a void function return a value?

前端 未结 5 1962
北海茫月
北海茫月 2021-01-27 07:54

I\'m a programming beginner and I have question regarding a return value from a function.

I´m studying Java.

I have attached code from my book that features a cl

5条回答
  •  北海茫月
    2021-01-27 08:11

    http://javadude.com/articles/passbyvalue.htm

    primitives in java such as char and int are passed by value in java.

    an array in java is simply a object container for whatever the type is..

    in java passing objects as parameters is similar to passing as a reference - where any modifications you make to the object passed in through the parameter will retain those changes in the calling method.

提交回复
热议问题