1、本篇博客主要介绍if语句的第一种格式
2、源码如下
class IfDemo
{
public static void main
(String
[] args
)
{
// System.out.println
("Hello World!1");
// System.out.println
("Hello World!2");
// System.out.println
("Hello World!3");
// System.out.println
("Hello World!4");
/*
if语句的第一种格式:
1,
if
(条件表达式
)
{
执行语句;
}
*/
int x
= 1
;
if
(x
>1
)
{
if
(x
<2
)
{
System.out.println
("yes");
}
}
System.out.println
("over");
}
}
我的微信号:
xiang20200106 ,欢迎大家找我聊天
— 【 THE END 】—
本公众号已经整理一套包含前端和后端的全套电子书教程,限时免费赠送,请在公众号里回复「
电子书」获取!
转载请注明原文地址:https://ipadbbs.8miu.com/read-52524.html