单选题

Given:   12. System.out.format("Pi is approximately %d.", Math.PI);   What is the result?()

A An exception is thrown at runtime.

B Pi is approximately 3.

C Pi is approximately 3.141593.

D Compilation fails.

正确答案

来源:www.examk.com

答案解析

相似试题
  • Given 11.public interface Status { 12. int MY_VALUE = 10; 13.} Which three are valid on line 12?()

    多选题查看答案

  • Given: Which code fragment, inserted at the end of line 12, produces the output p is 420?()

    单选题查看答案

  • Given: Which code fragment, inserted at the end of line 12, produces the output p is 420?()

    单选题查看答案

  • Given: 11.String test = "This is a test"; 12.String[] tokens = test.split("/s"); 13.System.out.println(tokens.length); What is the result?()

    单选题查看答案

  • Given: 12.String csv = "Sue,5,true,3"; 13.Scanner scanner = new Scanner( csv ); 14.scanner.useDelimiter(",");15. int age = scanner.nextInt(); What is the result?()

    单选题查看答案

  • Given: 11.String test = "a1b2c3"; 12.String[] tokens = test.split("//d"); 13.for(String s: tokens) System.out.print(s + " "); What is the result?()

    单选题查看答案

  • Given: What is the result when the programmer attempts to compile the code and run it with the command java Converter 12?()

    单选题查看答案

  • Given:   11. String test = "This is a test";   12. String[] tokens = test.split("/s");   13. System.out.println(tokens.length);   What is the result?()

    单选题查看答案

  • Given:   11. public void genNumbers() {   12. ArrayList numbers = new ArrayList();   13. for (int i=0; i

    单选题查看答案