msi865pe.java~11~

来自「《深入浅出设计模式》的完整源代码」· JAVA~11~ 代码 · 共 13 行

JAVA~11~
13
字号
package computerworld;

public class MSI865PE implements MainBoard {
  public void Attach(CPU cpu) throws Exception{
    if (cpu.getClass ().toString ().endsWith("Intel")){
      System.out.println("MSI865PE");
    }
else {
  throw new Exception("MSI865PE只能配Intel的CPU");
  }
}

}

⌨️ 快捷键说明

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