11. double input = 314159.26;  12. NumberFormat nf= NumberFormat.getInstance(Locale.ITALIAN);  13. String b;  14. //insert code here  Which code, inserted at line 14, sets the value of b to 3 14.159,26?() A、 b = nf.parse( input);B、 b = nf.format( input);C

题目

11. double input = 314159.26;  12. NumberFormat nf= NumberFormat.getInstance(Locale.ITALIAN);  13. String b;  14. //insert code here  Which code, inserted at line 14, sets the value of b to 3 14.159,26?() 

  • A、 b = nf.parse( input);
  • B、 b = nf.format( input);
  • C、 b = nf.equals( input);
  • D、 b = nf.parseObject( input);
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Given:11.doubleinput=314159.26;12.NumberFormatnf=NumberFormat.getInstance(Locale.ITALIAN);13.Stringb;14.//insertcodehereWhichcode,insertedatline14,setsthevalueofbto314.159,26?()

A.b=nf.parse(input);

B.b=nf.format(input);

C.b=nf.equals(input);

D.b=nf.parseObject(input);


参考答案:B

第2题:

11. public class Counter {  12. public static void main(String[] args) {  13. int numArgs = /* insert code here */;  14. }  15. }  and the command line: java Counter one fred 42 Which code, inserted at line 13, captures the number of arguments passed into the program?() 

  • A、 args.count
  • B、 args.length
  • C、 args.count()
  • D、 args.length()
  • E、 args.getLength()

正确答案:B

第3题:

Whichcode,insertedatline14,setsthevalueofbto314.159,26?()

A.b=nf.parse(input);

B.b=nf.format(input);

C.b=nf.equals(input);

D.b=nf.parseObject(input);


参考答案:B

第4题:

10. interface Foo {}  11. class Alpha implements Foo {}  12. class Beta extends Alpha {}  13. class Delta extends Beta {  14. public static void main( String[] args) {  15. Beta x = new Beta();  16. // insert code here  17. }  18. }  Which code, inserted at line 16, will cause a java.lang.ClassCastException?() 

  • A、 Alpha a = x;
  • B、 Foo f= (Delta)x;
  • C、 Foo f= (Alpha)x;
  • D、 Beta b = (Beta)(Alpha)x;

正确答案:B

第5题:

Given: 10.public void service(ServletRequest request, 11.ServletResponse response) { 12.ServletInputStream sis = 13.// insert code here 14.} Which retrieves the binary input stream on line 13?()

  • A、request.getWriter();
  • B、request.getReader();
  • C、request.getInputStream();
  • D、request.getResourceAsStream();

正确答案:C

第6题:

10. class Line {  11. public static class Point { }  12. }  13.  14. class Triangle {  15. // insert code here  16. }  Which code, inserted at line 15, creates an instance of the Point class defined in Line?() 

  • A、 Point p = new Point();
  • B、 Line.Point p = new Line.Point();
  • C、 The Point class cannot be instatiated at line 15.
  • D、 Line 1 = new Line() ; 1.Point p = new 1.Point();

正确答案:B

第7题:

10. class Nav{  11. public enum Direction { NORTH, SOUTH, EAST, WEST }  12. }  13. public class Sprite{  14. // insert code here  15. }  Which code, inserted at line 14, allows the Sprite class to compile?() 

  • A、 Direction d = NORTH;
  • B、 Nav.Direction d = NORTH;
  • C、 Direction d = Direction.NORTH;
  • D、 Nav.Direction d = Nav.Direction.NORTH;

正确答案:D

第8题:

doubleinput=314159.26;12.NumberFormatnf=NumberFormat.getInstance(Locale.ITALIAN);13.Stringb;14.//insertcodehereWhichcode,insertedatline14,setsthevalueofbto314.159,26?()

A.b=nf.parse(input);

B.b=nf.format(input);

C.b=nf.equals(input);

D.b=nf.parseObject(input);


参考答案:B

第9题:

11. public interface Status {  12. /* insert code here */ int MY_VALUE = 10;  13. }  Which three are valid on line 12?()

  • A、 final
  • B、 static
  • C、 native
  • D、 public
  • E、 private
  • F、 abstract
  • G、 protected

正确答案:A,B,D

第10题:

11. String test = “Test A. Test B. Test C.”;  12. // insert code here  13. String[] result = test.split(regex);  Which regular expression inserted at line 12 will correctly split test into “Test A,” “Test B,” and “Test C”?()

  • A、 String regex = “”;
  • B、 String regex = “ “;
  • C、 String regex = “.*“.
  • D、 String regex = “//s”
  • E、 String regex = “//.//s*”;
  • F、 String regex = “//w[ /.] +“;

正确答案:E

更多相关问题