永发信息网

小弟跪求简单计算器的java源程序代码,急……

答案:6  悬赏:60  手机版
解决时间 2021-05-18 07:31
  • 提问者网友:锁深秋
  • 2021-05-17 22:46

今天老师布置了计算器的JAVA程序题,小弟平时贪玩,球高手帮忙……跪谢……

题目如下:

计算器模拟程序

功能要求:该程序显示GUI用户界面,能实现整数的加、减、乘、除四则运算。

界面要示:用图形界面实现。可参考下图。

小弟急啊,求高手尽快解答。

最佳答案
  • 五星知识达人网友:低音帝王
  • 2021-05-17 23:32

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;


public class CaculatorFrame extends Frame
{
String sresult = ""; //存放当前要计算的数据
double iresult = 0.0; //存放到当前为止的计算结果
int flag1 = 0,flag2 = 0; //flag1记录小数点是否已经输入了,不允许两个以上小数点,flag2记录运算符号
TextField tf = new TextField("0",10);
public CaculatorFrame()
{
this.setLayout(new GridLayout(9,2));
tf.setFont(new Font(null,Font.ITALIC|Font.BOLD,40));
tf.setEditable(false);
this.add(tf);
//生成0-9的数字按钮
for(int i=0;i<10;i++) this.add(MyButton(String.valueOf((char)('0' + i))));

this.add(MyButton("."));

this.add(MyButton("C"));
this.add(MyButton("+"));
this.add(MyButton("-"));
this.add(MyButton("*"));
this.add(MyButton("/"));
this.add(MyButton("="));

setTitle("Caculator");
setSize(new Dimension(200, 400));
pack();
// Add window listener.
this.addWindowListener
(
new WindowAdapter() {
public void windowClosing(WindowEvent e) {
CaculatorFrame.this.windowClosed();
}
}
);
}


protected void windowClosed()
{
System.exit(0);
}

Button MyButton(String s) //按钮生成方法
{
Button bb= new Button(s);

bb.setBackground(Color.CYAN);
bb.setFont(new Font(null,Font.ITALIC|Font.BOLD,30));
bb.setSize(60,60);
bb.addActionListener(new BTlistener());
return bb;

}

class BTlistener implements ActionListener //事件处理监听类
{
public void actionPerformed(ActionEvent e)
{
Button bt = (Button)e.getSource();
String bn = bt.getLabel();
//输入数字处理
if (bn.compareTo("0") >= 0 && bn.compareTo("9") <=0)
{
if (bn == "0" && sresult.length() == 0)
tf.setText("0");
else
{
sresult=sresult + bn;
tf.setText(sresult);
}
}

//输入C,=,+,-,*,/等符号处理
if (bn == "C")
{
sresult = "";
iresult = 0;
tf.setText("0");
}
if ( bn == "=")
{
if (sresult.length() != 0 )
{
cacu(0);

}
}
if (bn == "+")
{
cacu(1);
}
if (bn == "-")
{
cacu(2);
}
if (bn == "*")
{
cacu(3);
}
if (bn == "/")
{
cacu(4);
}
if (bn == ".")
{
if(flag1 == 0 )
{ sresult=sresult + bn;flag1 = 1;}

tf.setText(sresult );


}
}
public void cacu(int x) //计算结果
{

if(iresult == 0 && sresult.length() != 0 )
{iresult = Double.parseDouble(sresult);}
else if(sresult.length() != 0 )
{
if (flag2 == 1) iresult = iresult + Double.parseDouble(sresult);
if (flag2 == 2) iresult = iresult - Double.parseDouble(sresult);
if (flag2 == 3) iresult = iresult * Double.parseDouble(sresult);
if (flag2 == 4 && Double.compare(Double.parseDouble(sresult), 0.0 ) != 0
)
iresult = iresult / Double.parseDouble(sresult);
else
{
if (Double.compare(Double.parseDouble(sresult) , 0.0 ) == 0
)
{
flag1=0;
sresult = "";
flag2=x;
iresult=0;
tf.setText("除数为0!" );
return;
}
}
}
flag1=0;
sresult = "";
tf.setText("" + iresult );
flag2 = x;
}
}
}






主类:



public class Caculator {

public static void main(String[] args) {
// Create application frame.
CaculatorFrame frame = new CaculatorFrame();

// Show frame
frame.setVisible(true);
}
}

全部回答
  • 1楼网友:掌灯师
  • 2021-05-18 03:52

import java.awt.*; import java.awt.event.*; import javax.swing.*;

public class Calculator extends JApplet { public static void main(String[] args) { CalculatorFrame frame = new CalculatorFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); }

public void init() { CalculatorPanel panel = new CalculatorPanel(); add(panel); } }

class CalculatorFrame extends JFrame { public CalculatorFrame() { setTitle("Calculator"); CalculatorPanel panel = new CalculatorPanel(); add(panel); pack(); } }

class CalculatorPanel extends JPanel { private JButton display;

private JPanel panel;

private double result;

private String lastCommand;

private boolean start;

public CalculatorPanel() { setLayout(new BorderLayout());

result = 0; lastCommand = "="; start = true;

// add the display

display = new JButton("0"); display.setEnabled(false); add(display, BorderLayout.NORTH);

ActionListener insert = new InsertAction(); ActionListener command = new CommandAction();

// add the buttons in a 4 x 4 grid

panel = new JPanel(); panel.setLayout(new GridLayout(4, 4));

addButton("7", insert); addButton("8", insert); addButton("9", insert); addButton("/", command);

addButton("4", insert); addButton("5", insert); addButton("6", insert); addButton("*", command);

addButton("1", insert); addButton("2", insert); addButton("3", insert); addButton("-", command);

addButton("0", insert); addButton(".", insert); addButton("=", command); addButton("+", command);

add(panel, BorderLayout.CENTER); }

private void addButton(String label, ActionListener listener) { JButton button = new JButton(label); button.addActionListener(listener); panel.add(button); }

private class InsertAction implements ActionListener { public void actionPerformed(ActionEvent event) { String input = event.getActionCommand(); if (start) { display.setText(""); start = false; } display.setText(display.getText() + input); } }

private class CommandAction implements ActionListener { public void actionPerformed(ActionEvent event) { String command = event.getActionCommand();

if (start) { if (command.equals("-")) { display.setText(command); start = false; } else lastCommand = command; } else { display.setText("" + calculate(Double.parseDouble(display.getText()),lastCommand)); lastCommand = command; start = true; } } }

public double calculate(double x,String action) { if (action.equals("+")) result += x; else if (action.equals("-")) result -= x; else if (action.equals("*")) result *= x; else if (action.equals("/")) result /= x; else if (action.equals("=")) result = x; return result; }

} 这个运行出来和你上面一样的 问问团队邯涵学友

随时回答您的问题
  • 2楼网友:夜风逐马
  • 2021-05-18 02:15

import java.awt.*; import java.awt.event.*; import java.awt.event.ActionListener; import java.util.EventListener; import javax.swing.*; class TextFrame extends JFrame{ //窗体的标题若在方法中定义只能在方法中有效若在方法外用则可以整个类有效 //JFrame f = new JFrame("this is my first"); JTextField tf = new JTextField("0"); tf.setHorizontalAlignment(0); String cal;//操作符变量 String source;//第一个操作数 String second;//第二个操作数 Double result; JMenuBar jmb = new JMenuBar(); JMenu menuEidt = new JMenu("编辑"); JMenu menuView = new JMenu("查看"); JMenu menuHelp = new JMenu("帮助"); JMenuItem eidtCopy = new JMenuItem("复制"); JMenuItem eidtParse = new JMenuItem("粘贴"); JMenuItem helpAbout = new JMenuItem("关于计算机"); String copyText =""; //用init方法实现窗口的构造 public void init(){ //正常退出程序,虽然JFrame里面就集成了监听器,但是它只是触发监听的时候隐藏窗体,并不结束程序,此语句用来退出程序 this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Jframe中不能添加容器,所以要用定义容器 Container c = this.getContentPane(); JPanel p = new JPanel(); p.setLayout(new GridLayout(4,5)); jmb.add(menuEidt); jmb.add(menuView); jmb.add(menuHelp); menuEidt.add(eidtCopy); menuEidt.add(eidtParse); menuHelp.add(helpAbout); this.setJMenuBar(jmb); JButton btOne = new JButton("1"); JButton btTwo = new JButton("2"); JButton btThree = new JButton("3"); JButton btAdd = new JButton("+"); JButton btFour = new JButton("4"); JButton btFive = new JButton("5"); JButton btSix = new JButton("6"); JButton btReduce = new JButton("-"); JButton btSeven = new JButton("7"); JButton btEight = new JButton("8"); JButton btNine = new JButton("9"); JButton btCheng = new JButton("*"); JButton btZero = new JButton("0"); JButton btPoint = new JButton("."); JButton btDeng = new JButton("="); JButton btChu = new JButton("/"); JButton btSqrt = new JButton("Sqrt"); JButton btReset = new JButton("%"); JButton btCbrt = new JButton("Cbrt"); JButton btFen = new JButton("1/x"); //把按钮添加容器上,然后再把容器添加到窗体上 p.add(btSqrt); p.add(btOne); p.add(btTwo); p.add(btThree); p.add(btAdd); p.add(btReset); p.add(btFour); p.add(btFive); p.add(btSix); p.add(btReduce); p.add(btCbrt); p.add(btSeven); p.add(btEight); p.add(btNine); p.add(btCheng); p.add(btFen); p.add(btZero); p.add(btPoint); p.add(btDeng); p.add(btChu); //把容器P添加到窗体上 c.add(p,"Center"); c.add(tf,"North"); this.setSize(300,300); this.setVisible(true); //b监听所有的事件源,用一个监听即可! Digit d = new Digit(); btOne.addActionListener(d); btTwo.addActionListener(d); btThree.addActionListener(d); btFour.addActionListener(d); btFive.addActionListener(d); btSix.addActionListener(d); btSeven.addActionListener(d); btEight.addActionListener(d); btNine.addActionListener(d); btZero.addActionListener(d); Oper O = new Oper(); btAdd.addActionListener(O); btReduce.addActionListener(O); btCheng.addActionListener(O); btChu.addActionListener(O); Res R = new Res(); btDeng.addActionListener(R); RestNum RS = new RestNum(); btReset.addActionListener(RS); SqrtNum SN = new SqrtNum(); btSqrt.addActionListener(SN); FenNum FN = new FenNum(); btFen.addActionListener(FN); CbrtNum CN = new CbrtNum(); btCbrt.addActionListener(CN); MyMenuListener MML = new MyMenuListener(); eidtCopy.addActionListener(MML); eidtParse.addActionListener(MML); helpAbout.addActionListener(MML); } //main方法直接调用Init方法 public static void main(String ar []){ new TextFrame().init(); }

//用来监视数字按钮,这是一个内部类 class Digit implements ActionListener{ public void actionPerformed(ActionEvent e){ //得到数字按钮的标签,得到的是字符串类型 String s = e.getActionCommand(); String a = tf.getText(); //显示文本框里的按钮内容 tf.setText(s); if(a.equals("0")||a.equals("+")||a.equals("-")||a.equals("*")||a.equals("/")) tf.setText(s); else tf.setText(a+s); } } class Oper implements ActionListener{ public void actionPerformed(ActionEvent e){ //得到当前操作符 cal = e.getActionCommand(); //用于得到前一个操作数 source = tf.getText(); tf.setText(cal); } } class Res implements ActionListener{ public void actionPerformed(ActionEvent e){ try{ double num1; num1 = Double.parseDouble(source); second = tf.getText(); double num2; num2 = Double.parseDouble(second); if(cal.equals("+")) result = num1+num2; if(cal.equals("-")) result = num1-num2; if(cal.equals("*")) result = num1*num2; if(cal.equals("/")){ try{ result = num1/num2; }catch(ArithmeticException c){ System.out.println("除数不能为0!"); } } tf.setText(result.toString()); }catch(Exception a){ System.out.println("There is something wrong!!!"); } } } class RestNum implements ActionListener{ public void actionPerformed(ActionEvent e){ tf.setText("0"); } } class SqrtNum implements ActionListener{ public void actionPerformed(ActionEvent e){ source = tf.getText(); Double num = Double.parseDouble(source); //注意这里引用的sqrt是Math类里面的方法,必须要体现面向对象,所以要用Math来调用sqrt方法 tf.setText(Double.toString(Math.sqrt(num))); } } class FenNum implements ActionListener{ public void actionPerformed(ActionEvent e){ try{ source = tf.getText(); //如果在这里捕获异常,必须导正除数确实是0! Integer num = Integer.parseInt(source); tf.setText(Double.toString(1/num)); System.out.println(num); }catch(ArithmeticException b){ System.out.println("除数不能为0"); } } } class CbrtNum implements ActionListener{ public void actionPerformed(ActionEvent e){ source = tf.getText(); Double num = Double.parseDouble(source); tf.setText(Double.toString(Math.cbrt(num))); } } class MyMenuListener implements ActionListener{ public void actionPerformed(ActionEvent e){ if(e.getSource()==eidtCopy) copyText = tf.getText(); else if(e.getSource()==eidtParse) tf.setText(copyText); else if(e.getSource()==helpAbout) JOptionPane.showMessageDialog(TextFrame.this, "*****************************************************\n"+ "| 程序作者:小女墙 |\n"+ "| 课  程:《JAVA程序设计》         |\n"+ "| 设计时间:2009年11月3日             |\n"+ "| 作者 QQ:785414943               |\n"+ "| 邮箱地址: |\n" "*****************************************************\n" ,"关于计算器",JOptionPane.INFORMATION_MESSAGE); } } }

  • 3楼网友:舍身薄凉客
  • 2021-05-18 01:08

我自己编写了一个,需要的话可以找我,支持括号,优先级等

  • 4楼网友:神也偏爱
  • 2021-05-18 01:01

用一个jframe,选网格布局,north上放一个jtextfield。south上放一个jpanel 在在上面放一堆按钮。给每个按钮加监听器,当点击按钮时,用jtextfield调用settext()方法,让jtextfield显示按钮对应的值。

大致思路就是这样。代码也就不到100行,很简单的。

  • 5楼网友:夜余生
  • 2021-05-17 23:57
import java.awt.*; Y2h)[{_timport java.awt.event.*;JAVA中文站社区门户_"hn*j+^(gUc,Tzy import javax.swing.*;JAVA中文站社区门户"z5b8iy&lH@ JAVA中文站社区门户q~!z/RT4v5RS JAVA中文站社区门户 {.J/k-]F JAVA中文站社区门户mMy)\+_eeMm public class testZ extends JFrame implements ActionListener{JAVA中文站社区门户&K~#cSe1O'[g,W!}p private JPanel jPanel1,jPanel2; )}#|F;z0o6Tc3v c private JTextField resultField; ;oQ4["FLW f h private JButton s1,s2,s3,s4,s5,s6,s7,s8,s9,s0,b1,b2,b3,b4,f1,f2;JAVA中文站社区门户+k*bn4^1JL|O private boolean end,add,sub,mul,div;JAVA中文站社区门户 z*S!{s#qfE@'@ private String str; 7X0T;w,U{/d ]K#Q&T private double num1,num2; /|u&t.r ~wY&ii z;` JAVA中文站社区门户};FgM+LV public testZ(){JAVA中文站社区门户1b$W`|8e \0z Q!H super("计算器");JAVA中文站社区门户7Y/kO9zY`4k+z7MA] ? setSize(300,240);JAVA中文站社区门户!Q)b*n4D;ZXXC Container con=getContentPane();JAVA中文站社区门户\%T#uo_%gBL con.setLayout(new BorderLayout());JAVA中文站社区门户'^(l t}1O M jPanel1=new JPanel(); 3B`8h[W(S_'D ~ jPanel1.setLayout(new GridLayout(1,1)); m E8nF GM Fg7b? jPanel2=new JPanel(); +g6h$Y!V5Nl$wvYI jPanel2.setLayout(new GridLayout(4,4)); mU!G2x5v resultField=new JTextField("0");JAVA中文站社区门户0i*aay VXS bo jPanel1.add(resultField); 6qKH:A5F con.add(jPanel1,BorderLayout.NORTH);JAVA中文站社区门户A ]%aaJY3}zK4b s1=new JButton(" 1 "); s1.addActionListener(this); ` M4VpP1M s2=new JButton(" 2 "); s2.addActionListener(this); g:BBhm s3=new JButton(" 3 "); s3.addActionListener(this); JAVA中文站社区门户5V d:FZ5n s4=new JButton(" 4 "); s4.addActionListener(this); e GWx4Iq9g s5=new JButton(" 5 "); s5.addActionListener(this);JAVA中文站社区门户d k9s1Md9r&VXS(B s6=new JButton(" 6 "); s6.addActionListener(this);JAVA中文站社区门户)L AUk M*c!G? s7=new JButton(" 7 "); s7.addActionListener(this);JAVA中文站社区门户zr\v,[^6H#R s8=new JButton(" 8 "); s8.addActionListener(this);JAVA中文站社区门户6l(FHQ,mY s9=new JButton(" 9 "); s9.addActionListener(this); ;?vc d*@ LR+W'I s0=new JButton(" 0 "); s0.addActionListener(this); h0fB(X tB b1=new JButton(" + "); b1.addActionListener(this); 'sO{(ViK b2=new JButton(" - "); b2.addActionListener(this); v^J y'Lu!K b3=new JButton(" * "); b3.addActionListener(this); 7O{{n$i,lmo6] b4=new JButton(" / "); b4.addActionListener(this);JAVA中文站社区门户p/ax*Sr W f1=new JButton(" . "); f1.addActionListener(this); D%kd4?;iIJ O p} f2=new JButton(" = "); f2.addActionListener(this); G{T { ?h-M~ }k jPanel2.add(s1); ZQ7f `HA jPanel2.add(s2);JAVA中文站社区门户At0\j0\0pMq jPanel2.add(s3);JAVA中文站社区门户 K$I| fL1hP/n,fe jPanel2.add(b1);JAVA中文站社区门户*r!f|Xjl1sV jPanel2.add(s4); K7D;wbyRW9KN;^#u jPanel2.add(s5); ,L]M L6K,y Bv jPanel2.add(s6); MES#lFvb ] jPanel2.add(b2); ){j_W*j4Qx#Z A jPanel2.add(s7);JAVA中文站社区门户Sn`g| jPanel2.add(s8);JAVA中文站社区门户.`1tBt4^7Tr)^ jPanel2.add(s9); 4[R+k.`&C0ui jPanel2.add(b3);JAVA中文站社区门户[`^%RQ3W\#Z jPanel2.add(s0); JAVA中文站社区门户&K}/uxYif0^+V2vB+r jPanel2.add(f1);JAVA中文站社区门户9in W4o5s:fH0k$a#ih jPanel2.add(f2);JAVA中文站社区门户 H3lq-x;[~ i Bu4i jPanel2.add(b4);JAVA中文站社区门户H/k(e(MQ con.add(jPanel2,BorderLayout.CENTER); -n#S:pj1zcvC p8Mw:fsbJAVA中文站社区门户;rlp;Cs6|3e(jtC 2_ _*?7u!Cr_ } wXxCgpublic void num(int i){ "[&BOptEb;e String s = null; 7Uz2j X8JSx s=String.valueOf(i);JAVA中文站社区门户5z^Fv ^{#z)d b if(end){ Dqd2Fk //如果数字输入结束,则将文本框置零,重新输入 )V^-n@;t'T8^:O(^ resultField.setText("0");JAVA中文站社区门户C"m2oi4y(F end=false; 2pcR'Y$P c2xxeG ,T7UB\P } Z9Z JP I#A!D8h} if((resultField.getText()).equals("0")){ ,}$? gB t3a //如果文本框的内容为零,则覆盖文本框的内容JAVA中文站社区门户4NL)`7br qRt resultField.setText(s); {;[sr.Lf JAVA中文站社区门户 H"Lp;OzTu }JAVA中文站社区门户C ?1FwP.`._ else{ k;A&|{w"[i&O //如果文本框的内容不为零,则在内容后面添加数字JAVA中文站社区门户9Y:d4t1QS E6{{F str = resultField.getText() + s; #\-^zst4]sl(p resultField.setText(str); N~hU"F6m )I TB._%Y0P/a4n1} }JAVA中文站社区门户%V1PKlti1Q4z } /eq0EH%],p~S"_+Q*x 4~A }u9X(A6WMpublic void actionPerformed(ActionEvent e){ //数字事件 _#rhdU$gj(Jh3T if(e.getSource()==s1)JAVA中文站社区门户_-_2c5{\1V'r num(1); ,SlCDvf else if(e.getSource()==s2) L/z%OOma H num(2); oLr#D#a,r*F else if(e.getSource()==s3)JAVA中文站社区门户o_bv:RB num(3); @ b,I(leY;Z else if(e.getSource()==s4)JAVA中文站社区门户\nl u4T&nYuS num(4); &\0jz.d6H(N9}5} else if(e.getSource()==s5)JAVA中文站社区门户?o&q(m wLf r5cW num(5); Hh&~6B5bZ7XQ else if(e.getSource()==s6)JAVA中文站社区门户N?I0~@:] num(6);JAVA中文站社区门户9Y7^ R%{u` qjQ else if(e.getSource()==s7) 7If#h$^m[.jT num(7);JAVA中文站社区门户htov5m y,Yk else if(e.getSource()==s8)JAVA中文站社区门户O a$L _.tqb{ num(8);JAVA中文站社区门户 `+p^ v}8z\ }y else if(e.getSource()==s9)JAVA中文站社区门户uc:t$]vG;_/t%m4DJ num(9);JAVA中文站社区门户R0h4}rD;M4SR else if(e.getSource()==s0)JAVA中文站社区门户5G @B8u6k^fw2o*{ num(0); $Igy!]%N-zc ? JAVA中文站社区门户f&_:E&z$w8Ru //符号事件 a&SDy9Ve"l9G else if(e.getSource()==b1) $M0k7u&mP sign(1);JAVA中文站社区门户H NH'l*H,@t else if(e.getSource()==b2)JAVA中文站社区门户GF&W(\&P7m7j sign(2);JAVA中文站社区门户B/h\MV/f else if(e.getSource()==b3)JAVA中文站社区门户)J YnYz5B sign(3); NMa[6~U&CQT else if(e.getSource()==b4) 9k0T1x[6b9_ Q sign(4);JAVA中文站社区门户v G#XD5N x9S //等号JAVA中文站社区门户q%Q&fn qw o,hu else if(e.getSource()==f1){ !^9{ ENt str=resultField.getText(); $f2D[8G&~ if(str.indexOf(".")<=1){JAVA中文站社区门户7@cQow str+="."; 5eo es8P"^2] o{"U(Z resultField.setText(str); r)r^T8BLa4m"_ } &r$~ jQ6~ } u2I#\^H!I9n#`(h else if(e.getSource()==f2){ $F%w \W7BG4}w num2=Double.parseDouble(resultField.getText()); 1|3xIqAmJAVA中文站社区门户Oc u'S@g#e 7nqN5f6yn /y&tV9|v*Jw.F if(add){ X!ub+KJ4i,W num1=num1 + num2;} \E;ZgD`y$O else if(sub){JAVA中文站社区门户(r2F4nZ;Be1T6L num1=num1 - num2;}JAVA中文站社区门户&t W's z!OMDRYP6{0y else if(mul){JAVA中文站社区门户J6IQq`4yEM num1=num1 * num2;}JAVA中文站社区门户-q'N*xm a6Z9O6w!s+@ else if(div){ ,c2p${ q%|d;t0b mh num1=num1 / num2;} JAVA中文站社区门户8Z)O]|g*t resultField.setText(String.valueOf(num1));JAVA中文站社区门户Gj7u8e;pE*](n end=true; K8Y5K'X3|;x } oi \N#izH8W7S A7R4V+Y/i;Qz`t JAVA中文站社区门户K(qx,j4s:Fwxh } -{ QEHdVnTpublic void sign(int s){JAVA中文站社区门户^ K9S} j(G;tK#cv5l if(s==1){ J5j8te"~"XC add=true;JAVA中文站社区门户8_+Mf tI0B8o9~7H sub=false; S,Jp/_*Cf-r9L mul=false; R,FmwK-f leDjG div=false;JAVA中文站社区门户:d(X ?F o]qH Z#[)j } fJ&h!n1W$O2u"b^ else if(s==2){ -AlGn9H#PA o1o add=false; IC2S]? ^r Z:L sub=true;JAVA中文站社区门户J_m3BHaK(c] mul=false; ? {4l ] Le.nw div=false;JAVA中文站社区门户:C&k*iB;?#n7{+f }JAVA中文站社区门户2y,@ u2zZH[r X%z&A else if(s==3){JAVA中文站社区门户-t#U(W Z#E6pZLR add=false;JAVA中文站社区门户|0C!xK/H"^ iN6i sub=false; nju1HXL[;}U?9u mul=true;JAVA中文站社区门户+CIy@*s~ div=false; 7f1K(TVh8uj&M J;T } t8gX\S&k7@0HE(Y else if(s==4){JAVA中文站社区门户bX&YBw add=false;JAVA中文站社区门户j'v)Q-B1K/G\_f sub=false; %m:C h6F%d|g mul=false;JAVA中文站社区门户;d8ig.J-W8i div=true; {4~g.Z8fx"RqZ } JAVA中文站社区门户)? jl I3E$_0W num1=Double.parseDouble(resultField.getText());JAVA中文站社区门户8~RK0J/r,J7E%z end=true;JAVA中文站社区门户/vr;Yn0bt ? } O2| B;f&Sopublic static void main(String[] args){ UnB)\g9CRn testZ th1=new testZ();JAVA中文站社区门户0UW1a vSs3I th1.show(); /t3_ C7uVL } 7xh'Xi#Ms e3d } Uuchv9s K,};Z:}LRX N'lJ
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯