The important point here is that the constructor form takes only one argument, so you have to enclose the object sequence within parentheses.
这里重要的一点是,构造函数构成中仅有一个变量,因此您必须在括号中包括对象序列。
Figure 1 shows a constructor with two arguments of type Point and a destructor modeled for the DrawingSurface class of the sample application used here for illustration purposes.
图1展示了为示例应用程序(在这里用于举例)的drawingsurface类建模的带有两个Point类型参数的构造方法和一个析构方法。
One interesting point is the decision to return any exceptions from this method, as well as any that arise in the constructor, as IOExceptions.
一个有趣的事情是决定将来自此方法的任何异常,以及构造函数中出现的任何异常作为IOException返回。
应用推荐