Skip to content

Commit

Permalink
Update 反射机制.md
Browse files Browse the repository at this point in the history
fix typo
  • Loading branch information
jiayanguo authored May 21, 2021
1 parent 11670be commit 470b56b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/java/basis/反射机制.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Class alunbarClass2 = o.getClass();
**4.通过类加载器`xxxClassLoader.loadClass()`传入类路径获取:**

```java
class clazz = ClassLoader.LoadClass("cn.javaguide.TargetObject");
Class clazz = ClassLoader.loadClass("cn.javaguide.TargetObject");
```

通过类加载器获取 Class 对象不会进行初始化,意味着不进行包括初始化等一些列步骤,静态块和静态对象不会得到执行
Expand Down Expand Up @@ -173,4 +173,4 @@ value is JavaGuide

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

0 comments on commit 470b56b

Please sign in to comment.