You are viewing a single comment's thread. Return to all comments →
String[] sortedArray = Arrays.stream(s) .filter(Objects::nonNull) .sorted((a, b) -> (new BigDecimal(b)).compareTo(new BigDecimal(a))) .toArray(String[]::new); for(int i=0;i<n;i++) { s[i]=sortedArray[i]; }
Seems like cookies are disabled on this browser, please enable them to open this website
Java BigDecimal
You are viewing a single comment's thread. Return to all comments →