题目内容

以下Math类的方法中,-4.4通过哪个方法运算后,结果为-5.0?

A. round()
B. min()
C. floor()
D. ceil()

查看答案
更多问题

String s = "abcdedcba";则s.substring(3,4)返回的字符串是以下选项中的哪个?

A. cd
B. de
C. d
D. e

阅读下面的程序:public class test { public static void main(String args[]) { int i; float f = 2.3f; double d = 2.7; i = ((int)Math.ceil(f)) * ((int)Math.round(d)); System.out.println(i); } } 程序执行后,运行结果为以下哪个选项?

A. 9
B. 5
C. 6
D. 6.1

下列选项中,可以正确创建一个字符串的是?( )

A. String s = "itcast";
B. String s = new String("itcast");
C. String s = new String(new char[] {'i','t','c','a','s','t'});
D. String s = new String(new int[]{1,2,3});

下列选项中,可以实现String初始化的是?()

A. String str = "abc";
B. String str = new String();
C. String str = new String("abc");
D. char[] chs = {'a','b','c'};

答案查题题库