Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
60 lines (45 loc) · 968 Bytes

File metadata and controls

60 lines (45 loc) · 968 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* @author LZD 2018/03/10
*/
/*
* 三种基本注解:Override、Deprecated和SuppressWarnings
*/
package Annotation;
public class firstTest {
public final int a = 1;
public firstTest() {
System.out.println("firstTest");
}
public static void mian(String[] args) {
// TODO Auto-generated method stub
firstTest ft = new firstTest();
// a = 0;
final father f = new father();
f.say();
// f = new father();
}
}
class father {
private String name = "kkk";
public void say() {
System.out.println("i am your father");
}
@SuppressWarnings("unused") // 不警告过时
@Deprecated // 过时
private void info() {
// TODO Auto-generated method stub
System.out.println("my name is " + name);
}
}
class son extends father {
@Override
public void say() {
// TODO Auto-generated method stub
super.say();
}
@SuppressWarnings("unused")
// @Override
private void info() {
System.out.println("该方法不是重写的方法");
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.