Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. case 4:
  2. String treeoutput = "",
  3. arrayoutput = "",
  4. hashoutput = "";
  5. treeoutput = treeSet.stream().map((value) -> value.toString() + " ").reduce(treeoutput, String::concat);
  6. arrayoutput = treeSet.stream().map((value) -> value.toString() + " ").reduce(arrayoutput, String::concat);
  7. hashoutput = treeSet.stream().map((value) -> value.toString() + " ").reduce(hashoutput, String::concat);
  8. System.out.print("Array Output: " + arrayoutput + "\n");
  9. System.out.print("Tree Output: " + treeoutput + "\n");
  10. System.out.print("Hash Output: " + hashoutput + "\n");
  11. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement