Skip to content

Commit

Permalink
Update reflection.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Snailclimb authored May 19, 2020
1 parent c37d4f2 commit 880226e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/java/basic/reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ I love JavaGuide
value is JavaGuide
```

**注意** : 有读者提到上面代码运行会抛出 `ClassNotFoundException` 异常,具体原因是你没有下面这段代码的包名替换成自己创建的 `TargetObject` 所在的包 。

```java
Class<?> tagetClass = Class.forName("cn.javaguide.TargetObject");
```


### 静态编译和动态编译

- **静态编译:** 在编译时确定类型,绑定对象
Expand Down

0 comments on commit 880226e

Please sign in to comment.