if

public static void main(String[] args ){

int money = 10;

 if(money>=10){

   System.out.println("买棒棒糖");

}else{

     System.out.println("什么也不买");

}

}

原文地址:https://www.cnblogs.com/a157/p/6685123.html