鴻蒙OS NumberFormatException

2022-05-31 17:06 更新

NumberFormatException

java.lang.Object

|---java.lang.Throwable

|---|---java.lang.Exception

|---|---|---java.lang.RuntimeException

|---|---|---|---java.lang.IllegalArgumentException

|---|---|---|---|---java.lang.NumberFormatException

  1. public class NumberFormatException
  2. extends IllegalArgumentException

拋出以指示應(yīng)用程序已嘗試將字符串轉(zhuǎn)換為其中一種數(shù)字類型,但該字符串沒有適當(dāng)?shù)母袷健?/p>

構(gòu)造函數(shù)摘要

構(gòu)造函數(shù) 描述
NumberFormatException() 構(gòu)造一個沒有詳細(xì)消息的 NumberFormatException。
NumberFormatException(String s) 構(gòu)造帶有指定詳細(xì)消息的 NumberFormatException。

方法總結(jié)

從類 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

構(gòu)造函數(shù)詳細(xì)信息

NumberFormatException

public NumberFormatException()

構(gòu)造一個沒有詳細(xì)消息的 NumberFormatException。

NumberFormatException

public NumberFormatException(String s)

構(gòu)造帶有指定詳細(xì)消息的 NumberFormatException。

參數(shù):

參數(shù)名稱 參數(shù)描述
s 詳細(xì)信息。
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號