You are viewing a single comment's thread. Return to all comments →
for (int i=n; i>=0; i--) { for (int j=0; j<i-1; j++) { BigDecimal numA = new BigDecimal(s[j]); BigDecimal numB = new BigDecimal(s[j+1]); if (numA.compareTo(numB) == -1) { String tmp = s[j]; s[j] = s[j+1]; s[j+1] = tmp; } } }
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 →