小编Dan*_*Lat的帖子

当单选按钮选中时,为什么不解决方程?

所以我有一个叫方程式的方法,应检查是否有任何值为0,但它们不是?据我所知,当我用单选按钮选择它们时,它们根本不运行.为什么是这样?它只是将位移值打印为0. Idk在这做什么?所有帮助表示赞赏!

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
//import java.applet.Applet;

public class RadioButton extends JPanel {
//Values that can be entered at the beginning, the code will explain to you what this means and how you can find the other values
    //If you don't know one of the values, make it 0

    int xDisplacement = 0; 
    int xVAvg = 8;
    int xTime = 8 ;

    public void equations() {
         if (xDisplacement == 0) {
             //solve for displacement
                int xDisplacement = …
Run Code Online (Sandbox Code Playgroud)

java if-statement

0
推荐指数
1
解决办法
40
查看次数

标签 统计

if-statement ×1

java ×1