Computer Science, asked by harkirtpadda29761, 1 year ago

What is the difference between Java references and pointers in other languages?

Answers

Answered by MissWorkholic
0
Heya chika ✌️,

Other languages including C++, Java, Python, Ruby, Perl and PHP support references. On the surface, both references and pointers are very similar, both are used to have one variable provide access to another. ...Pointers: A pointer is a variable that holds memory address of another variable.

hope it helps!
mark as brainliest mate ☺️
Answered by AditiSinha23
0

Java references = In Java,a reference is a type category. Reference types include: classes, interfaces, arrays, enums, and annotations. Java is a pass-by-value language, but references are themselves a kind of value. This means that when you pass a reference type to a method, that method has access to the data and can change it.

Pointers in other language = Pointers can point nowhere ( NULL ), You can't take the address of a reference like you can with pointers. There's no "reference arithmetic" (but you can take the address of an object pointed by a reference and do pointer arithmetic on it as in &obj + 5 ).

hope it helps you mark me brainlist plzz

Similar questions