标签:chapter What Java System 错题 println 单选题 Math out
4.
The statement System.out.printf("%3.1f", 1234.56) outputs ___________.
回答错误
单选题 (1 分) 0 分
- A.
123.5
- B.
1234.56
- C.
123.4
- D.
1234.6
- E.
1234.5
注意四舍五入
6.
What is Math.round(3.6)?
单选题 (1 分) 1 分
- A.
3.0
- B.
3
- C.
4.0
- D.
4
四舍五入,注意
-1.5得到的是-1
-1.6得到-2
1.5得到2
1.4得到1
-
8.
Math.floor(5.5) evaluates to _____.
回答错误单选题 (1 分) 0 分
- A.
6.0
- B.
5.0
- C.
5
- D.
6
- A.
向下取整
5.5得到5.0
-5.5得到-6.0
12.
A Java character is stored in __________.
回答错误
单选题 (1 分) 0 分
- A.
one byte
- B.
three bytes
- C.
four bytes
- D.
two bytes
20.
What is Math.rint(3.6)?
单选题 (1 分) 1 分
- A.
4.0
- B.
3
- C.
5.0
- D.
3.0
27.
Assume that the ASCII code for character c is 99. What is the printout of the following code?
System.out.println("a" + 'c');
回答错误
单选题 (1 分) 0 分
- A.
196
- B.
9799
- C.
a99
- D.
ac
41.
Which of the following method returns the sine of 90 degree?
回答错误
单选题 (1 分) 0 分
- A.
Math.sin(Math.PI)
- B.
Math.sin(Math.toRadian(90))
- C.
Math.sine(90)
- D.
Math.sin(90)
- E.
Math.sin(PI)
Java Math.toRadians() 方法用于将角度转换为弧度
50.
What is "Welcome" + 1 + 1*2?
回答错误
单选题 (1 分) 0 分
- A.
Welcome11*2
- B.
Welcome3
- C.
Welcome12
- D.
Welcome4
54.
Suppose Character x = new Character('a'), __________________ returns true.
回答错误
多选题 (3 分) 0 分
- A.
x.equals(new Character('a'))
- B.
x.compareToIgnoreCase('A')
- C.
x.equalsIgnoreCase('A')
- D.
x.equals('a')
- E.
x.equals("a")
58.
Which of the following are valid specifiers for the printf statement?
多选题 (3 分) 3 分
- A.
%6d
- B.
%10.2e
- C.
%8.2d
- D.
%10b
- E.
%4c
67.
Suppose i is an int type variable. Which of the following statements display the character whose Unicode is stored in variable i?
单选题 (1 分) 1 分
- A.
System.out.println((int)i);
- B.
System.out.println(i + " ");
- C.
System.out.println((char)i);
- D.
System.out.println(i);
标签:chapter,What,Java,System,错题,println,单选题,Math,out 来源: https://blog.csdn.net/qq_51415695/article/details/121558118
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。