java - A value over size of integer -


this question has answer here:

i'm vietnamese english's not good, please sympathize me. in advance. have question. input integer value if been out of size of int. ex: input = 1323544875154846543513521 how catch error? must input in , check value?

simple: don't use int, use use biginteger.

you might wanna other jvm languages have number auto-casting, is, automatically changing number type according value @ runtime (e.g. clojure).


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -