Dimitar182

Zadacha2

Apr 21st, 2021 (edited)
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public class Zadacha2 {
  2.  
  3. public static void main(String[] args) {
  4. String nubers = " 15 14 57 | 50 47 26 | 20 58 45";
  5. nubers = nubers.replaceAll("\\s+"," ");
  6. System.out.println("Current array:" + nubers);
  7. String[] splitText =nubers.split("\\|");
  8. for (int i = splitText.length - 1; i > - 1 ; i--) {
  9. System.out.print(splitText[i]);
  10. }
  11. }
  12. }
Add Comment
Please, Sign In to add comment