msik7n2g.java~14~

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

JAVA~14~
12
字号
package computerworld;

public class MSIK7N2G implements MainBoard{
    public void Attach(CPU cpu) throws Exception{
      if (cpu.getClass ().toString ().endsWith("AMD")){
        System.out.print("MSIK7N2G");
      }
  else {
    throw new Exception(this.getClass ().toString () + "只能配" +cpu.getClass ().toString ());
    }
  }
}

⌨️ 快捷键说明

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