jQuery in Action, 3rd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Dan Exam doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Dan Exam doubt" Watch "Dan Exam doubt" New topic

Dan Exam doubt

Vishy Karl
Ranch Hand

Joined: Sep 08, 2003
Posts: 116
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,

"The man who can drive himself further once the effort gets painful is the man who will win." <br />Roger Bannister
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8927

It will be stored in some temp storage (in stack).

subject: Dan Exam doubt
It's not a secret anymore!