Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class sp {
- public static void main(String[] args) {
- String number = " 12 56 71 | 90 87 67 | 33 47 65";
- number = number.replaceAll("\\s+","");
- System.out.println("Current array:" + number);
- String[] numbers = number.split("\\|");
- for (int i = numbers.length -1; i > -1 ; i--) {
- System.out.print(numbers[i]);
- }
- }
- }
Add Comment
Please, Sign In to add comment