Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. package zadania.zad1;
  2.  
  3.  
  4. import java.util.function.Function;
  5.  
  6. public class Main10 {
  7. public static void main(String[] args) {
  8. Function<String, String> rewerse = x -> {
  9. String fromBehind = "";
  10. for (int i = x.length() - 1; i >= 0; i--) {
  11. fromBehind += x.charAt(i);
  12. }
  13. System.out.println(fromBehind);
  14. return fromBehind;
  15. };
  16. rewerse.apply("alkoholik");
  17. }
  18.  
  19.  
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement