Normally the values of width and height are non-negative integers. The constructors that allow you to create a dimension do not prevent you from setting a negative value for these properties. If the value of width or height is negative, the behavior of some methods defined by other objects is undefined. 一般而言,如果宽度和高度的值是非负整数,构造器会允许你创建一个dimension,而不会阻止你去设置一个这些属性为负数,如果这些宽度,长度的值是负数,那么,一些方法的执行动作所定义的就是没有定义的。
如果你的高度和宽度是一个负数,那么对于其它对象所定义的某些方法来说,这个高度和宽度是未定义的
一般而言,如果宽度和高度的值是非负整数,构造器会允许你创建一个dimension,而不会阻止你去设置一个这些属性为负数,如果这些宽度,长度的值是负数,那么,一些方法的执行动作所定义的就是没有定义的。