全部评论
if语句只能执行一次
能不能前面直接输A然后x为0??
不能用多线程。。。
他最后只告诉了我思路,前面声明一个boolean a ,a=一个方法体。里面返回false并输出A
答案:1.if(System.out.append("A")==null){ System.out.print("A"); }else{ System.out.print("B"); } 2.if(new Object(){{System.out.print("A");}} == null){ System.out.print("A"); }else{ System.out.print("B"); } 3.if(true)System.out.print("A"); if(false){ System.out.print("A"); }else{ System.out.print("B"); }
相关推荐
点赞 评论 收藏
分享
![](https://static.nowcoder.com/fe/file/oss/1716965564844UEBJN.png)
![](https://static.nowcoder.com/fe/file/oss/1716965585666UBBME.png)
深信服
| 校招
| 15个岗位
点赞 评论 收藏
分享