+ 2
Value and Reference types
Hello, I am new to java and am unable to understand the difference between the value and Reference types in classes. Can someone please describe it a bit clearly? Is it similar to the pass by value and pass by reference thing as in C, C++. Please elaborate.
3 ответов
0
Java is pass-by-value
0
Then can u please explain the difference between value and Reference types
0
Ruchika Sehgal Their is no type difference between value and referenced. Not that I know of.
The only difference is that Pass by value will create a copy *value* at a new memory address, while Pass by reference uses the same memory address of whatever was passed in.