Best practices regarding equals: to overload or not to overload?

后端 未结 8 1003
刺人心
刺人心 2020-12-09 02:48

Consider the following snippet:

import java.util.*;
public class EqualsOverload {
    public static void main(String[] args) {
        class Thing {
                 


        
8条回答
  •  北荒
    北荒 (楼主)
    2020-12-09 03:04

    I use this approach with override and overload combo in my projects, because code looks a bit cleaner. I didn't have problems with this approach so far.

提交回复
热议问题