1 /*
2  * Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved.
3  * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  *
5  *
6  *
7  *
8  *
9  *
10  *
11  *
12  *
13  *
14  *
15  *
16  *
17  *
18  *
19  *
20  *
21  *
22  *
23  *
24  */

25
26 package java.lang;
27
28 /**
29  * Thrown to indicate that the application has attempted to convert
30  * a string to one of the numeric types, but that the string does not
31  * have the appropriate format.
32  *
33  * @author  unascribed
34  * @see     java.lang.Integer#parseInt(String)
35  * @since   JDK1.0
36  */

37 public
38 class NumberFormatException extends IllegalArgumentException {
39     static final long serialVersionUID = -2848938806368998894L;
40
41     /**
42      * Constructs a <code>NumberFormatException</code> with no detail message.
43      */

44     public NumberFormatException () {
45         super();
46     }
47
48     /**
49      * Constructs a <code>NumberFormatException</code> with the
50      * specified detail message.
51      *
52      * @param   s   the detail message.
53      */

54     public NumberFormatException (String s) {
55         super (s);
56     }
57
58     /**
59      * Factory method for making a <code>NumberFormatException</code>
60      * given the specified input which caused the error.
61      *
62      * @param   s   the input causing the error
63      */

64     static NumberFormatException forInputString(String s) {
65         return new NumberFormatException("For input string: \"" + s + "\"");
66     }
67 }
68
Powered by JavaMelody