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

📄 slogan.java

📁 Java 程序设计教程(第五版)EXAMPLESchap06源码
💻 JAVA
字号:
//********************************************************************//  Slogan.java       Author: Lewis/Loftus////  Represents a single slogan string.//********************************************************************public class Slogan{   private String phrase;   private static int count = 0;   //-----------------------------------------------------------------   //  Constructor: Sets up the slogan and counts the number of   //  instances created.   //-----------------------------------------------------------------   public Slogan (String str)   {      phrase = str;      count++;   }   //-----------------------------------------------------------------   //  Returns this slogan as a string.   //-----------------------------------------------------------------   public String toString()   {      return phrase;   }   //-----------------------------------------------------------------   //  Returns the number of instances of this class that have been   //  created.   //-----------------------------------------------------------------   public static int getCount ()   {      return count;   }}

⌨️ 快捷键说明

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