donaricano-btn

Call by value

- There is only call by value in java, not call by reference


1. Example


50

50

- The value of data is not changed

2. Another Example

 

- If we pass object in place of any primitive value, original value will be changed

- This case we are passing object as a value



'Back-End > Java_1' 카테고리의 다른 글

[Java] Life cycle of a thread  (0) 2016.10.05
[Java] Multithreading in java  (0) 2016.10.05
[Java] Encapsulation  (0) 2016.09.12
[Java] Package  (0) 2016.09.12
[Java] Interface  (0) 2016.09.12
블로그 이미지

리딩리드

,