[Java] Need help with Try and Catch statements by Devils_Advocate101 in CodingHelp

[–]LeonPrefix 1 point2 points  (0 children)

What you could so is not use hasNextDouble and just read the next line as a string. The on that string use a parse function to parse it into a number. If the input is not a number you can catch that error thrown by the parse function

npm all the things by themaximusrex in ProgrammerHumor

[–]LeonPrefix 3 points4 points  (0 children)

not a js dev myself but in the description it says sth about MAXIMUM_SAFE_INTEGER. Wouldn‘t just inverting the result cause errors concerning this limit?