黑马程序员技术交流社区
标题:
形参提问public Polygon polygonFrom(Point... corners)
[打印本页]
作者:
cobblerime
时间:
2016-11-4 23:03
标题:
形参提问public Polygon polygonFrom(Point... corners)
public Polygon polygonFrom
(Point... corners)
{ int numberOfSides = corners.length; double squareOfSide1, lengthOfSide1; squareOfSide1 = (corners[1].x - corners[0].x) * (corners[1].x - corners[0].x) + (corners[1].y - corners[0].y) * (corners[1].y - corners[0].y); lengthOfSide1 = Math.sqrt(squareOfSide1); // more method body code follows that creates and returns a // polygon connecting the Points}没见过这样的形参。求解释。
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2