Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
numbersGame = new NumbersGame().position;オブジェクトの作成中に位置の値を取得します。後で呼び出しnumbersShow()ても、 の値がさかのぼって変更されることはありませんnumbersGame。
numbersGame = new NumbersGame().position;
numbersShow()
numbersGame
これは値のコピーであり、参照のコピーではありません。