Java 简单if else语句

2019年2月12日21:43:43 发表评论 972 views
/**
 * Created by xabcd on 2019/2/12.
 */
public class TestJava_if2
{public static void main(String args[])
{
    int a =6;
    if (a%2 ==1)
        System.out.println(a+"是奇数!");
    else
        System.out.println(a+"是偶数!");

}
}

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: