Skip to content

Commit

Permalink
Merge pull request Snailclimb#1203 from jiayanguo/patch-1
Browse files Browse the repository at this point in the history
Update 反射机制.md
  • Loading branch information
Snailclimb authored May 23, 2021
2 parents 2062c3e + 470b56b commit 12728c5
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 12728c5

Please sign in to comment.