Q; my dought is in preceding code whether the bits of return value x(i.e x value is 6)stored in result variable or square value stored in result variale?
[edit]Add code tags. CR[/edit]
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32604
4
posted
0
Please always use the CODE button; I have edited your post so you can see how much better it looks.
I don't really understand your question. I suggest you go through the execution of that code by writing down the values on paper. Then tell us what conclusion you have drawn.
Q; my dought is in preceding code whether the bits of return value x(i.e x value is 6)stored in result variable or square value stored in result variale?
Please rewrite the question. not able to understand !!
Here obj2.square calls the square method (class Two) , calculates the square value and returns the result which is stored in a local varibale result (class Relate)