⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 point.java

📁 Java2入门经典第二章源码
💻 JAVA
字号:
public class Point
{
  // Create a point from its coordinates
  public Point(double xVal, double yVal)
  {
     x = xVal;
     y = yVal;
  }

  // Create a point from another point
  public Point(Point point)
  {
     x = point.x;
     y = point.y;
  }

  // Convert a point to a string
  public String toString()
  { 
     return x+","+y; 
  }

  // Coordinates of the point
  protected double x;
  protected double y;
}

⌨️ 快捷键说明

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