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

📄 homebuilder.java

📁 orcale9i-java-programming外文书籍源码,结合orcale数据库的java的程序,内有jdbc等非常丰富的内容,好东西
💻 JAVA
字号:
public class HomeBuilder {
  public static void main(String arg[]) {
    ThreeBedroomHouse myHouse1 = new ThreeBedroomHouse();

    // This is legal.
    myHouse1.cleanThirdBedroom();

    House myHouse2 = new ThreeBedroomHouse();

    // This is not legal. It will generate an error
    // at compile time.
    myHouse2.cleanThirdBedroom();

    // But we could cast myHouse2 to a ThreeBedroomHouse:
    ThreeBedroomHouse myHouse3 = (ThreeBedroomHouse) myHouse2;

    // So this would be legal:
    myHouse3.cleanThirdBedroom();

    // Or we could do the casting above in one line
    // without using an extra variable
    ((ThreeBedroomHouse) myHouse2).cleanThirdBedroom();
  } 
}

⌨️ 快捷键说明

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