(Object obj)
| 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; |
no outgoing calls