square.java

来自「JAVA源代码程序aashjkjhkjhkjhjkhkj」· Java 代码 · 共 37 行

JAVA
37
字号
/** * class to model a square */public class Square    {    protected int length ;    public Square()	{	length = 0 ;	} // end of constructor method    public Square(int l)	{	length = l ;	} // end of constructor method    public int getLength()	{	return length ;	} // end of method getLength    public int area()	{	return length * length ;	} // end of method area    public int perimeter()	{	return length * 4 ;	} // end of method perimeter    } // end of class Square

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?