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

📄 four.java

📁 学习算法写的经典算法程序
💻 JAVA
字号:
public class four {
  static int count=0;
  final int i=5;
	int petalCount = 0;
  String s = new String("null");
  Flower(String s, int petals) {
	   petalCount = petals;
     this.s = s; // 
    System.out.println("String & int args");
  }
  Flower() {
	    this("hi", 47);
	    System.out.println("default constructor (no args)");
	    count++;
	  }
	  void print() {

	    System.out.println("petalCount = " + petalCount + " s = "+ s +" count="+count +"i ="+i);
	  }
	  public static void main(String[] args) {
	    Flower x = new Flower();
	    x.print();
	    Flower y = new Flower();
	    y.print();
	  }
	}

⌨️ 快捷键说明

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