0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

参照型変数とは

Posted at

参照型変数とは
クラス型と配列型とinterface型の三種類


sample san1 = new sample → sample1オブジェクト
sample san2 = new sample → sample2オブジェクト

sample san1
sample san2

ここにsample = sam1と書けばsam2は消滅
         ↓
sample san1 = new sample → sample1オブジェクト
sample san2 = new sample → sample1オブジェクト

san2が参照するところはsample1に変更される

NULLを代入すると参照先が無いという意味になる

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?