You are viewing a single comment's thread. Return to all comments →
//Solution BigDecimal a,b; for(int i = 0;i<n;i++){ for(int j=0;j<n-1-i;j++){ a=new BigDecimal(s[j]); b=new BigDecimal(s[j+1]); if(a.compareTo(b)<0){ // algorithm of bubble sort String temp = s[j]; s[j]=s[j+1]; s[j+1]=temp; } } }
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 →