-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathChild.java
More file actions
38 lines (29 loc) · 779 Bytes
/
Child.java
File metadata and controls
38 lines (29 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.baiiu.java;
/**
* author: zhuzhe
* time: 2020-02-21
* description:
*/
public class Child extends Parent {
public static final int A = 10;
public static int b = 10;
public int c = 10;
private final Object object;
static {
System.out.println("Child静态代码块 ==== " + b++);
}
{
System.out.println("Child构造代码块 ==== " + b++ + ", " + c++);
}
public Child() {
System.out.println("Child构造函数 ==== " + b++ + ", " + c++);
object = "123";
}
@Override
public void function() {
System.out.println("Child方法 ==== " + b++ + ", " + c++);
}
public static void functionStatic() {
System.out.println("Child static方法 ==== " + b++);
}
}