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

📄 listpoint.java

📁 Java2入门经典第二章源码
💻 JAVA
字号:
public class ListPoint
{
  // Constructor 
  public ListPoint(Point point)
  {
    this.point = point;            // Store point reference
    next = null;                   // Set next ListPoint as null
  }

  // Set the pointer to the next ListPoint
  public void setNext(ListPoint next)
  {
    this.next = next;              // Store the next ListPoint
  }

  // Get the next point in the list
  public ListPoint getNext()
  {
    return next;                   // Return the next ListPoint
  }

  // Return String representation
  public String toString()
  {
    return "(" + point + ")";
  }

   private ListPoint next;         // Refers to next ListPoint in the list
   private Point point;            // The point for this list point
}

⌨️ 快捷键说明

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