+ 10

Is reference types in JAVA are works as pointers in C ?

18th May 2019, 8:15 AM
Hari Gopal
Hari Gopal - avatar
2 Answers
+ 2
Well kinda In fact in Java as in C, all objects are stored as references in variable. The difference is that Java manage them himself, so you don't have to. The consequences are that your code is easier to write as you don't have to bother with them, but on the other side you've got less (to no) control over how the memory is handled as it's Java and it's garbage collector who's in charge of freeing memory, unlike C where you do it yourself. One is more efficient when it comes to memory, the other is easier to write/understand
18th May 2019, 9:30 AM
ThewyShift
ThewyShift - avatar
+ 1
Its all
28th May 2019, 11:09 AM
Ibrahim A Uba
Ibrahim A Uba - avatar