SHARE
TWEET

Untitled

a guest Jul 17th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Arrays;
  2. import java.util.Collections;
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6.     public static void main(String[] args) {
  7.         Scanner scanner=new Scanner(System.in);
  8.         String line=scanner.nextLine();
  9.         String[]strArray=line.split(", ");
  10.         Arrays.sort(strArray,Collections.reverseOrder());
  11.         for (int i = 0; i <strArray.length ; i++) {
  12.  
  13.             System.out.print(String.join(", ",strArray[i]));
  14.         }
  15.     }
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top