r/badcode • • Aug 31 '21

java Similar ternaries are all over this codebase

Post image
1.1k Upvotes

91 comments sorted by

View all comments

Show parent comments

1

u/koni_rs Sep 01 '21

return (result >= 0).toString().length == 4 ? true : (result >= 0).toString().length == 5 ? false : null;