Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dan Exam doubt

 
Vishy Karl
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a doubt, look at the foll. code.

Ans is :-
Prints: 1, 2, 3, 4, 11,
Now my question is where the value returned by the method m being assigned. Should it now throw a compiler error(although i did check by compiling and surprisingly it does not give error) as we are not assigning value returned by function m ?? where it the value returned being asssigned .
thanks in advance,
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It will be stored in some temp storage (in stack).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic