• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help in return type

 
Raj chiru
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator







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
Pie
Posts: 49813
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Good luck with it
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic