Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I mean u can subtract the number from zero if it has negative sign to get it positive but this my sir is a masterpiece indeed ..
-
I can't decide if more upset by the string replace or that long ass redundant variable...
-
stisch46036y@Commodore I have good news, you can have both! I am enraged by all of these things and more. :)
Related Rants
Found this gem yesterday...
function justNumber(BigDecimal n) {
string negative_sign = "-";
BigDecimal response = BigDecimal.valueOf(n.toString().replace(negative_sign, ""));
return response;
}
rant
abs op
bad code
java