2012-12-03 3 views

답변

0

그것으로 선으로

음을 문자열 라인을 넣어하는 방법은 매우 간단합니다 looking at the API :

만큼 TreeNode를 구현 것처럼
p.println("This is your line"); 
p.println("New line (OS dependant) is added automatically"); 
0

(무시) ​​toString() 메서드 이 작업을 수행 할 수 있습니다.

p.print(this); 

f 재귀 버전을 구현하는 것입니다 :

p.println(myvalue); 
for (TreeNode child : children) { 
    write(child); 
}