exception « bigdecimal « Java Data Type Q&A

Home
Java Data Type Q&A
1.bigdecimal
2.biginteger
3.bit
4.Boolean
5.byte
6.Calendar
7.cast
8.character
9.Date Time
10.Date Time Format
11.decimal
12.Development
13.double
14.enum
15.float
16.hexadecimal
17.Integer
18.Number
19.Number Format
20.primitive
21.SimpleDateFormat
22.string
23.StringBuffer
24.StringBuilder
25.StringTokenizer
26.substring
27.TimeZone
Java Data Type Q&A » bigdecimal » exception 

1. Java library to check whether a String contains a number *without* exceptions    stackoverflow.com

I'm looking for a method that returns a boolean if the String it is passed is a valid number (e.g. "123.55e-9", "-333,556"). I don't want to just do:

public boolean isANumber(String s) ...

2. Exception in java.math.BigDecimal    coderanch.com

You can check the source code of BigDecimal by unpacking the src.zip file in your JDK folder. Anyway, I checked for you, and line 647 is this: this(val.toCharArray(), 0, val.length());So that means that for the exception to come from this line you have somewhere a call to new BigDecimal with a null string. Since re isn't null and you say rev1 ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.