This keyword in Java

boolean isEquals(Main main){
    Main m1=this;
    Main m2=main;
    if(m1==m2)  //地址比较两个对象是否是<a href="https://www.jb51.cc/tag/yige/" target="_blank" class="keywords">一个</a>
        return true;
    if(m1.name.equals(m2.name) &amp;&amp; m1.age==m2.age)
        return true;
    else 
        return false;
}

}

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>