![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Core Java
打怪升级的人生
这个作者很懒,什么都没留下…
展开
-
Core Java - 如何重写equals()方法
5.2.1 The equals method参考链接:https://web.mit.edu/6.005/www/fa15/classes/15-equality/我们先来看 == vs. equals() The == operator compares references. More precisely, it tests referential equality. Two references are == if they point to the same storage.原创 2020-06-10 05:55:09 · 670 阅读 · 0 评论 -
Core Java - Inheritance: Classes, Superclasses, and Subclasses
5.1.1 Defining SubclassesAll inheritance in Java is public inheritance.The keyword extends indicates that you are making a new class that derives from an existing class.The existing class is called the superclass, base class, or parent class. The n..原创 2020-06-06 08:53:05 · 219 阅读 · 0 评论 -
Core Java - 4.6 Object Construction
4.6.1 Overloading 重载Overloading occurs if several methods have the same name but different parameters.比较常见的就是一个class有多个constructors。Example:// Java program to demonstrate working of method // overloading in Java. public class Sum { // Overlo..原创 2020-06-04 21:58:14 · 168 阅读 · 0 评论