📄 multi.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package calculatrice;/** * * @author Loïc */public class Multi extends Operateur { public String afficher(){ return "*"; }; public void operer(Pile p){ if(p.estvide()==false){ int val1=p.depiler(); int val2=p.depiler(); p.empiler(val1*val2); } } public static void main(String args[]){ /*test de la methode operer*/ Pile p=new Pile(3); Multi pl=new Multi(); int res; p.empiler(1); p.empiler(2); pl.operer(p); res=p.depiler(); System.out.println(res);} }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -