if语句真正用法
2012-04-24 17:37
274 查看
class ZhenJiaDemo { public static void main(String[] args) { if (false) { System.out.println("真在执行!!!"); } else { System.out.println("假在执行!!!!"); } } } //if只执行true语句!!! //else执行false语句!!!
class ZhenJiaDemo { public static void main(String[] args) { boolean flag=false; if (flag) { System.out.println("真在执行!!!"); } else { System.out.println("假在执行!!!!"); } } } 并不是判断后真才执行if语句!
相关文章推荐
- java的if语句用法总结及总结
- go语言中if语句用法实例
- Python中的if、else、elif语句用法简明讲解
- 详解C++编程中的条件判断语句if-else与switch的用法
- 【Velocity模板引擎】前端页面#if...#elseif...#end语句用法
- if语句的用法
- shell下的if语句简单用法
- shell脚本中if语句的用法
- JavaScript If else 语句用法 【每日一段代码43】
- C++编程中__if_exists与__if_not_exists语句的用法
- Java基础(极客)——05、Java if判断语句的用法
- shell脚本if与read语句用法练习
- 【iOS开发基础教程】C语言if语句的用法
- SQL语句---nvl、ifnull 用法(将null转代为0)
- sql语句里的if用法实例
- sql声明变量,及if -else语句、while语句的用法
- mybatis-动态sql语句-if用法
- Shell if语句用法小结
- 详解C语言中条件判断语句if和switch的用法
- js中的if 语句、多分支语句、嵌套语句的用法