News
The release of Java SE 15 in Sept 2020 will introduce "sealed classes" as a preview feature. A sealed class is a class or interface which restricts which other classes or interfaces may extend it.
Rectangle Class This is a simple Java class to represent a rectangle. The class includes features to initialize, modify, and display the rectangle's dimensions.
package chapter_13; /** * (Enable Rectangle comparable) Rewrite the Rectangle class in Listing 13.3 to * extend GeometricObject and implement the Comparable interface.
This looks like the Liskov substitution principle that Uncle Bob Martin described: Substitute a derived class (Square) for a base class (Rectangle). From the standpoint of the compiler, the above code ...
Results that may be inaccessible to you are currently showing.
Hide inaccessible results