Extracted prettyString from toString() method to new method prettyString()

This commit is contained in:
2020-01-20 15:42:15 +01:00
parent 3f166aced0
commit eb2d5f07be
3 changed files with 7 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ val poland = TreeNode("Poland")
val france = TreeNode("France")
europe.addChild(poland)
europe.addChild(france)
println(root)
println(root.prettyString())
```
**Pretty Kotlin**
@@ -55,7 +55,7 @@ TreeNode<String> poland = new TreeNode<>("Poland");
TreeNode<String> france = new TreeNode<>("France");
europe.addChild(poland);
europe.addChild(france);
System.out.println(root);
System.out.println(root.prettyString());
```
*Output:*