Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Arrays;
- import java.util.Scanner;
- public class zadacha {
- public static void printArrays(String [] splitInput){
- for (int i = splitInput.length - 1; i >= 0; i--) {
- System.out.print(splitInput[i] + " ");
- }
- }
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- String input = scan.nextLine();
- String [] splitInput = input.split(" ");
- System.out.println(Arrays.toString(splitInput));
- printArrays(splitInput);
- }
- }
Add Comment
Please, Sign In to add comment