Thank you for enlighten me with your explanation Dheeraj Joshi. It was really getting into my nerves.
thanks again, really appreciate it!
User Profile
Collapse
-
Maybe I wasn't clear enough.
yes I know that I called called() by caller().
The problem is that the text from called() was written above the text from caller(). While the returned value (0) was placed in the appropriate please.
I mean shouldn't the text from called() be written inside text from caller()? why is the return value is separated from the text?
Thanks in advance.Leave a comment:
-
Issue while calling a method
Code:public class Sample { public int called() { System.out.println(".....I shouldn't be here....."); return 0; } public void caller() { System.out.println("It is supposed to be here -->(" + called() + ")<-- Why isn't it working?\n"); } } public class Test { public static
No activity results to display
Show More
Leave a comment: