Skip to content

Instantly share code, notes, and snippets.

@shui
Created June 11, 2017 07:54
Show Gist options
  • Save shui/a569ff89c4b42860de5d7f97fbfc8b1f to your computer and use it in GitHub Desktop.
Save shui/a569ff89c4b42860de5d7f97fbfc8b1f to your computer and use it in GitHub Desktop.
Java初始化顺序
  1. 父类静态成员、static块 > 子类静态成员、static块 > 父类普通成员、普通块 > 父类构造器 > 子类普通成员、普通块 > 子类构造器
  2. 同级顺序取决于定义顺序
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment