后浪云鸿蒙OS教程:鸿蒙OS NumberFormatException

树叶云

NumberFormatException

java.lang.Object

|—java.lang.Throwable

|—|—java.lang.Exception

|—|—|—java.lang.RuntimeException

|—|—|—|—java.lang.IllegalArgumentException

|—|—|—|—|—java.lang.NumberFormatException

public class NumberFormatException
extends IllegalArgumentException

抛出以指示应用程序已尝试将字符串转换为其中一种数字类型,但该字符串没有适当的格式。

构造函数摘要

构造函数描述
NumberFormatException()构造一个没有详细消息的 NumberFormatException。
NumberFormatException(String s)构造带有指定详细消息的 NumberFormatException。

方法总结

从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从类 java.lang.Throwable 继承的方法
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

构造函数详细信息

NumberFormatException

public NumberFormatException()

构造一个没有详细消息的 NumberFormatException。

NumberFormatException

public NumberFormatException(String s)

构造带有指定详细消息的 NumberFormatException。

参数:

参数名称参数描述
s详细信息。

文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/174773.html<

(0)
运维的头像运维
上一篇2025-03-24 09:56
下一篇 2025-03-24 09:57

相关推荐

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注