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

📄 testchinese.java

📁 Java面向对象的电子书与一些事例
💻 JAVA
字号:
package testchinese;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2006</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class TestChinese {
    public static void main(String[] args) {
        //---------- 静态变量的使用 ----------
        //使用<类名>.<变量名>的格式访问静态变量
        System.out.println("Chinese country is " + Chinese.country);

        //使用<对象名>.<变量名>的格式访问静态变量
        Chinese ch = new Chinese();
        System.out.println("Chinese country is " + ch.country);
        ch.singOurCountry();

//        //---------- 静态方法的使用 ----------
//        //使用<类名>.<方法名>的格式访问静态方法
//        Chinese.sing();
//
//        //使用<对象名>.<方法名>的格式访问静态方法
//        Chinese ch = new Chinese();
//        ch.sing();
//        ch.singOurCountry();
    }
}

⌨️ 快捷键说明

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