?? 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 + -