Advertisement
Guest User

Zaloop ver2

a guest
Feb 25th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStreamReader;
  4.  
  5. public class Trokis {
  6.  
  7. private String zaloop;
  8.  
  9. public static void main(String[] args) throws IOException {
  10. Trokis One = new Trokis();
  11. System.out.println(One.getResult());
  12. }
  13.  
  14. private String getScan() throws IOException {
  15. BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
  16. return reader.readLine();
  17. }
  18.  
  19. private String getResult() throws IOException {
  20. zaloop = getScan();
  21. char myChar = zaloop.charAt(zaloop.length() - 1);
  22. zaloop = zaloop.substring(0, zaloop.length() - 1);
  23. return myChar + zaloop;
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement