MCPcopy Create free account
hub / github.com/DuGuQiuBai/Java / equals

Method equals

day11/code/day11_Object/src/cn/itcast_02/Student.java:34–54  ·  view source on GitHub ↗
(Object obj)

Source from the content-addressed store, hash-verified

32
33
34 @Override
35 public boolean equals(Object obj) {
36 if (this == obj)
37 return true;
38
39 if (obj == null)
40 return false;
41
42 if (getClass() != obj.getClass())
43 return false;
44
45 Student other = (Student) obj;
46 if (age != other.age)
47 return false;
48 if (name == null) {
49 if (other.name != null)
50 return false;
51 } else if (!name.equals(other.name))
52 return false;
53 return true;
54 }
55
56 // @Override
57 // public boolean equals(Object obj) { // Object obj = s2;

Callers 15

mainMethod · 0.95
mainMethod · 0.45
isDuiChengMethod · 0.45
runMethod · 0.45
runMethod · 0.45
setDisUsersMethod · 0.45
actionPerformedMethod · 0.45
actionPerformedMethod · 0.45
actionPerformedMethod · 0.45
setDisUsersMethod · 0.45
mainMethod · 0.45
showMethod · 0.45

Calls

no outgoing calls

Tested by 5

isDuiChengMethod · 0.36
mainMethod · 0.36
mainMethod · 0.36
mainMethod · 0.36
mainMethod · 0.36