getWidth method: This method returns the current width value of an object, such as a rectangle.
getHeight method: This method returns the current height value of an object, such as a rectangle.
toString method:This method converts an object into its string representation. For example, it can convert a rectangle object into a readable string format that describes its properties.