結果 : how to avoid stack overflow error in java