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
Post a Comment