亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在 Java ATW 中使用 Big Decimal

如何在 Java ATW 中使用 Big Decimal

鳳凰求蠱 2021-08-19 18:42:17
package SI;import java.awt.*;import java.awt.event.*;import java.lang.*;import java.math.*;import java.math.BigDecimal;import static oracle.jrockit.jfr.events.Bits.doubleValue;import static oracle.jrockit.jfr.events.Bits.floatValue;import static oracle.jrockit.jfr.events.Bits.intValue;public class SI extends Frame implements ActionListener{    TextField ptf,rtf,ttf,sitf,atf,citf,atf1;    Button ab,sib,cib,ab1;    Label pl,rl,tl,sil,al,cil,al1;    SI(){        pl=new Label("Principal:");        pl.setBounds(15,50,50,20);        ptf=new TextField();        ptf.setBounds(150, 50, 150, 20);        rl=new Label("Rate:");        rl.setBounds(15,100,50,20);        rtf=new TextField();        rtf.setBounds(150, 100, 150, 20);        tl=new Label("Time:");        tl.setBounds(15,150,50,20);        ttf=new TextField();        ttf.setBounds(150, 150, 150, 20);        sil=new Label("Simple Interest:");        sil.setBounds(15,200,150,20);        sitf=new TextField();        sitf.setBounds(150, 200, 150, 20);        sitf.setEditable(false);        sib=new Button("Simple Interest");        sib.setBounds(120,400,100,50);        sib.addActionListener(this);        cil=new Label("Compound Interest:");        cil.setBounds(15,250,200,20);        citf=new TextField();        citf.setBounds(150, 250, 150, 20);        citf.setEditable(false);        cib=new Button("Compound Interest");        cib.setBounds(240,400,130,50);        cib.addActionListener(this);這個小程序不工作。當我單擊按鈕時,它會引發錯誤。在我將所有 double 更改為 BigDecimal 后,此錯誤開始。請幫幫我。我被困在這里很多天了。這里有什么錯誤。我對 BigDecimal 不太了解。我是新手。請幫幫我。為什么會拋出錯誤?
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 242 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號