算法第一章

Posted Kkky

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了算法第一章相关的知识,希望对你有一定的参考价值。

1. System.out.println(true && false || true && true);

技术分享
true   

// false||true
// &&优先级高于||
答案

2. System.out.println(1 + 2 + "3");

技术分享
33     //数字转化为字符串
答案

3.    a. System.out.println(‘b‘);
  b. System.out.println(‘b‘ + ‘c‘);
  c. System.out.println((char) (‘a‘ + 4));

技术分享
b
197   //b的ASCII码为98,c的为99。记住a是97
e    
答案

 



以上是关于算法第一章的主要内容,如果未能解决你的问题,请参考以下文章