📄 xypoint-javadoc.html
字号:
<html><head><title>Code Fragment</title></head><body text=#000000><center></center><br><br><dl><dd><pre><font color=#ff0080>/** * This class defines an immutable (x,y) point in the plane. * * @author Michael Goodrich */</font><font color=#8000a0>public</font> <font color=#8000a0><font color=#ff8000>class</font> </font>XYPoint { <font color=#8000a0><font color=#8000a0>private</font> </font><font color=#8000a0>double</font> x,y; <font color=#ff0080>// private instance variables for the coordinates</font> <font color=#ff0080>/** * Construct an (x,y) point at a specified location. * * @param xCoor The x-coordinate of the point * @param yCoor The y-coordinate of the point */</font> <font color=#8000a0><font color=#8000a0>public</font> </font><font color=#0000ff>XYPoint</font>(<font color=#8000a0>double</font> xCoor, <font color=#8000a0><font color=#8000a0>double</font> </font>yCoor) { x = xCoor; y = yCoor; } <font color=#ff0080>/** * Return x-coordinate value. * * @return x-coordinate */</font> <font color=#8000a0><font color=#8000a0>public</font> </font><font color=#8000a0>double</font> <font color=#0000ff>getX</font>() { <font color=#8000a0><font color=#ff8000>return</font> </font>x; } <font color=#ff0080>/** * Return y-coordinate value. * * @return y-coordinate */</font> <font color=#8000a0><font color=#8000a0>public</font> </font><font color=#8000a0>double</font> <font color=#0000ff>getY</font>() { <font color=#8000a0><font color=#ff8000>return</font> </font>y; }}</dl></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -