0
Variables in C and Java
In C language if you use the method in Java as a user defined function and it is called in a program, it directly referes to the function and return back the variable's value but why is the difference occurring in Java?
5 Answers
0
It is the same in Java
https://www.sololearn.com/learn/Java/2153/
0
https://code.sololearn.com/c80sJkw7BnEn/?ref=app
see this
0
Try x = addOneTo(x);
In C the same thing would happen unless you pass a pointer to x to the function
0
So what you say is Variables in Java are pointers in C?