and why ofcourse? Also what steps will the toString method be executed 3 times by the compiler? [ Jess added UBB [code] tags to preserve whitespace, check 'em out! ] [ January 30, 2003: Message edited by: Jessica Sant ]
it prints just what you expect... Guess what this is hello Check out the API for String.toString() "This object (which is already a string!) is itself returned." Do you expect something else to happen??
The result is: ============================================== Guess what this is hello ============================================== Not printing the hello for three times.