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

📄 test.java

📁 《JAVA程序设计教程》这本书的所有源代码
💻 JAVA
字号:
//  Test.java
// Point类测试程序
import javax.swing.JOptionPane;
//import com.deitel.jhtp3.ch09.Point;

public class Test {
   public static void main( String args[] )
   {
      Point p = new Point( 72, 115 );
      String output;

      output = "X coordinate is " + p.getX() +
               "\nY coordinate is " + p.getY();

      p.setPoint( 10, 10 );

      // 使用隐含引用 p.toString()
      output += "\n\nThe new location of p is " + p;

      JOptionPane.showMessageDialog( null, output,
         "Demonstrating Class Point",
         JOptionPane.INFORMATION_MESSAGE );
      System.exit( 0 );
   }
}

⌨️ 快捷键说明

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