More about Objects and Classes
The relational operations on primitive data are ==, >=, <=, >, <, and !=. They compare two data values, when those values' type has an ordering. For example, integers are ordered by size or magnitude. The result of a relational operation is a boolean value: either True or False. The relational operators on objects like Strings are different, and they are expressed as methods. Pay special attention to the equality method, equals().
25. End of the Chapter
Yes. It happens all the time. Does that mean you are
equalto them or
End of the Chapter
You have reached the end of the chapter. If you missed some points, click on a subject that interests you to go to where it was discussed.
- The description of the Point, class Point class
- constructor, overloaded Several options in constructor parameters.
- object reference, picture A picture of reference variables and the objects they refer to.
- The toString() toString() method.
- method, parameter less Using a method that does not need a parameter.
- temporary object Temporary objects.
- object, method changes state A picture, showing a new object created with different data.
- The equals() equals() method.
- Definition of alias alias.
- What the == operator