https://blog.csdn.net/hdjbdbfj/article/details/104497700
https://blog.csdn.net/qq_41119146/article/details/103846095
https://blog.csdn.net/qq_41119146/article/details/103846095
2020-03-02
最赞回答 / 慕瓜3396416
因为在运算符优先级表中+的运算级大于==,那意味着什么呢?就是说在你题中的运算顺序是先把+两边的字符连接,在用连接起来的整体与str2相比较(就是指判断这个整体与str2是否相同:如果不相同输出false;如果相同,输出true),即:先做 "str1等于str2"+str1 ,运行结果是这样的: str1等于str2hello然后做 str1等于str2hello==str2 ,最终结果是这样的: false而我加了括号的运算顺序是怎样呢?先计算==两边的表达式...
2020-03-02
three=one+two;
System.out.println("three=one+two==>"+three);
three += one;
System.out.println("three+=one==>"+three);
three -= one;
System.out.println("three-=one==>"+three);
three *= one;
System.out.println("three=one+two==>"+three);
three += one;
System.out.println("three+=one==>"+three);
three -= one;
System.out.println("three-=one==>"+three);
three *= one;
2020-03-02
最新回答 / qq_虓弑悳酆_0
public class Test6 { public static void main(String[] args) { char today='日'; switch(today){ case('一'|'三'|'五'): System.out.println("早餐吃包子"); case('二'|'四'|'六'): System.out.println("早餐吃油条"); default: System.out.pr...
2020-03-01
最新回答 / Mr沐阳
作用域问题:<...code...>
但入如果 把score定义在 main方法中的话,则for循环中不需再表明数据类型,直接调用main方法中的变量score即可如下:<...code...>
2020-02-29