有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

Android中java解析Conflict multiple if-else和逻辑操作文本

很简单,但我不能理解其中的一部分

我有Stringlogictext1=“如果(QN_723_0>;=25和QN_723_0<;=30),那么QN_723_1=75结束IF”

让我们假设QN_723_0 is AgeQN_723_1 is weight

你看我的绳子上面,也很清楚

if I gave input age 28 and weight exactly 75 then return true output otherwise false..

if I gave input age 45 and weight exactly 75 then gives false output.

if I gave input age 45 and weight exactly 74 then gives true output.

我怎么做?我的主要问题是如何在java中解析上面的if-else和string

enter image description here


共 (1) 个答案

  1. # 1 楼答案

    public boolean GetValue() {
        int QN_723_0_age = 0, QN_723_1_weight = 0;
        if ((QN_723_0_age >= 25 && QN_723_0_age <= 30)) {
                    QN_723_1_weight == 75;
            return true;
        } else {
            return false;
        }
    }
    

    我希望它对你有用

    if i gave input age 28 and weight exactly 75 then return true output 
    
    if i gave input age 45 and weight exactly 75 then gives false output.
    
    if i gave input age 45 and weight exactly 74 then gives false output.