ghmgm
package test;

public class Condition_Phase {
    public static void main (String[] args)
    {
        
        //The Traditional Mode
        int money = 9000;
        if (money>1000)
        {
            System.out.println("The Money is more than 1000");
        }
        if (money<=1000)
        {
            System.out.println("The Money is less than 1000");
        }
        
        
        //The Simple Mode
        int crop = 8000;
        int harvest = 0;
        harvest = crop>=1000? 2000:crop;
        System.out.println("You can get "+harvest+" unit crop");
    }
}

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-08-05
  • 2021-05-27
  • 2021-12-16
  • 2021-06-16
  • 2021-05-27
  • 2021-05-10
  • 2021-12-30
猜你喜欢
  • 2022-01-04
  • 2021-12-11
  • 2021-11-20
  • 2021-12-27
  • 2021-12-25
  • 2021-04-17
  • 2022-02-25
相关资源
相似解决方案