单项选择题
Which method is an appropriate way to determine the cosine of 42 degrees?()
A. Double d = Math.cos(42);
B. Double d = Math.cosine(42);
C. Double d = Math.cos(Math.toRadians(42));
D. Double d = Math.cos(Math.toDegrees(42));
E. Double d = Math.cosine(Math.toRadians(42));
点击查看答案&解析
相关考题
-
填空题
Public class test ( Public static void stringReplace (String text) ( Text = text.replace (‘j’ , ‘i’); ) public static void bufferReplace (StringBuffer text) ( text = text.append (“C”) ) public static void main (String args[]} ( String textString = new String (“java”); StringBuffer text BufferString = new StringBuffer (“java”); stringReplace (textString); bufferReplace (textBuffer); System.out.printLn (textString + textBuffer); ) ) What is the output?() -
单项选择题
String a = “ABCD”; String b = a.toLowerCase(); b.replace(‘a’, ‘d’); b.replace(‘b’, ‘c’); System.out.println(b); What is the result? ()
A. abcd
B. ABCD
C. dccd
D. dcba
E. Compilation fails.
F. An exception is thrown at runtime. -
单项选择题
System.out.println(Math.sqrt(-4D));Whatistheresult?()
A. –2
B. NaN
C. Infinity
D. Compilation fails.
E. An exception is thrown at runtime.
