msi865pe.java~8~
来自「《深入浅出设计模式》的完整源代码」· JAVA~8~ 代码 · 共 13 行
JAVA~8~
13 行
package computerworld;
public class MSI865PE implements MainBoard {
public void Attach(CPU cpu){
if (cpu.getClass ().toString () != "computerworld.Intel") {
System.out.println (this.getClass ().toString () + "只能配 Intel CPU");
}
else {
System.out.println (this.getClass ().toString () + "配" +
cpu.getClass ().toString ());
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?