One of the difference between C function and a java method is that the objects are passed explicitly in C and implicitly in Java,
Can any one provide an example of what implicit and explicit passing pls?
One of the difference between C function and a java method is that the
Share
At least in Java if it’s passed by reference, the reference that gets passed, the pointer I recall it’s called in C , is a COPY of the original pointer and not the original pointer itself.
So there’s a memory area with the information about the object. Then there’s a pointer TO that memory area. When Java passes by reference, it first COPIES that pointer to the memory area, then passes that COPY of the pointer as a parameter.
This is all completely separate from the other pass by reference and pass by value distinction.