Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. //Now
  2. String[] upcase(String[] input) {
  3. return Arrays.stream(input)
  4. .map(String::toUpperCase)
  5. .toArray(String[]::new);
  6. }
  7.  
  8. //before
  9. String[] upcase(String[] input) {
  10. String[] result = new String[input.length]
  11.  
  12. for (int i = 0; i < input.length; i++) {
  13. result[i] = input[i].toUpperCase;
  14. }
  15.  
  16. return result;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement