forked from tkggft/JavaClassicInterviewQuestions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA.java
More file actions
38 lines (34 loc) · 826 Bytes
/
A.java
File metadata and controls
38 lines (34 loc) · 826 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
/**
* @auther: WJoe
* @Description:
* @Date : 17:54 2018/9/21
*/
class A
{
public void one() {System.out.println("one");}
private void two() {System.out.println("two");}
static void three() {System.out.println("three");}
protected void four() {System.out.println("four");}
public void test()
{
this.one();
this.two();
this.three();
this.four();
}
}
class B extends A
{
public void one() {System.out.println("Bone");}
private void two() {System.out.println("Btwo");}
static void three() {System.out.println("Bthree");}
protected void four() {System.out.println("Bfour");}
}
class test {
public static void main(String[] args) {
// TODO Auto-generated method stub
B b = new B();
b.test();
b.three();
}
}