jianglilili / jianglilili/guodegang.github.io

方法中抛出异常

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

- 在项目开发中,通常是自顶向下进行的。在完成项目的整体设计后,需要对每个接口和类进行编写。如果一个类使用了其他类还没有实现的方法,则可以在实现其他类方法时让其抛出UnsupportedOperationException,以便在以后进行修改完成。

- throwException()方法,用于抛出异常
```
public class ThrowException
{
public static void throwException()
{
throw new UnsupportedOperationException("方法尚未实现");
}

public static void main(String[] args)
{
ThrowException.throwException();
}

}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.