Joined
Last Seen
0 Reputation Points
100% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
0 Endorsements
Ranked #107.55K
1 Posted Topic
Re: This solution doesn't work with big values, try this: public static void main(String[] args){ Double d = new Double("100000000000000000"); BigDecimal big = new BigDecimal(d); System.out.println("Double: " + Double.toString(d)); System.out.println("BigDecimal: " + big.toString()); } Results: Double: 1.0E17 BigDecimal: 100000000000000000 |
The End.