美图齐众专注资阳网站设计 资阳网站制作 资阳网站建设
资阳网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

创新互联鸿蒙OS教程:鸿蒙OSInterruptedException

InterruptedException

网站建设哪家好,找创新互联!专注于网页设计、网站建设、微信开发、小程序制作、集团企业网站建设等服务项目。为回馈新老客户创新互联还提供了温江免费建站欢迎大家使用!

java.lang.Object

|---java.lang.Throwable

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

|---|---|---java.lang.InterruptedException

public class InterruptedException
extends Exception

当线程等待、休眠或以其他方式被占用,并且线程在活动之前或期间被中断时抛出。 有时某个方法可能希望测试当前线程是否已被中断,如果是,则立即抛出此异常。 下面的代码可以用来实现这个效果:

  if (Thread.interrupted())  // Clears interrupted status!
      throw new InterruptedException();

构造函数摘要

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

方法总结

从类 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

构造函数详细信息

InterruptedException

public InterruptedException()

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

InterruptedException

public InterruptedException(String s)

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

参数:

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

文章标题:创新互联鸿蒙OS教程:鸿蒙OSInterruptedException
标题URL:http://www.zsjierui.cn/article/cdsiseh.html

其他资讯