System.out.format(”Pi is approximately %d.”, Math.PI); What is the result?() A、 Compilation fails.B、 Pi is approximately 3.C、 Pi is approximately 3.141593.D、 An exception is thrown at runtime.
System.out.format(”Pi is approximately %d.”, Math.PI); What is the result?()
- A、 Compilation fails.
- B、 Pi is approximately 3.
- C、 Pi is approximately 3.141593.
- D、 An exception is thrown at runtime.
相关考题:
importjava.io.PrintWriter;classDoFormat{publicstaticvoidmain(String[]args){intx=42;inty=12345;floatz=7;System.out.format(-%4d-,x);System.out.format(-%4d-,y);System.out.format(-%4.1d-,z);}}结果为:()A.编译失败B.-42--1234--7.0-C.-42--1234--7.0-D.运行时异常被抛出
现有importjava.io.PrintWriter;classDoFormat{publicstaticvoidmain(String[]args){intx=42;inty=12345;floatZ-7;System.out.format(一%4d-,X);System.out.format(-%4d-,y);System.out.format(-%4.ld-,z);}}结果为:()A.编译失败B.-42--1234--7.0-C.-42--1234--7.0-D.-42--12345--7.0-E.运行时异常被抛出
System.out.format(”Piisapproximately%d.”,Math.PI);Whatistheresult?() A.Compilationfails.B.Piisapproximately3.C.Piisapproximately3.141593.D.Anexceptionisthrownatruntime.
现有 import java.io.PrintWriter; class DoFormat{ public static void main (String [] args) { int x=42; int y=12345; float Z-7 ; System.out.format("一%4d-", X); System. out.format("-%4d-", y); System. out.format("-%4.ld-",z); } } 结果为:() A、编译失败B、 -42- -1234- -7.0-C、 - 42- -1234- -7.0-D、 - 42- -12345- -7.0-E、运行时异常被抛出
import java.io.PrintWriter; class DoFormat { public static void main(String [] args) { int x = 42; int y = 12345; float z = 7; System.out.format("-%4d- ", x); System.out.format("-%4d- ", y); System.out.format("-%4.1d- ", z); } } 结果为:() A、编译失败B、-42- -1234- -7.0-C、- 42- -1234- - 7.0-D、运行时异常被抛出
单选题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.
单选题import java.io.PrintWriter; class DoFormat { public static void main(String [] args) { int x = 42; int y = 12345; float z = 7; System.out.format("-%4d- ", x); System.out.format("-%4d- ", y); System.out.format("-%4.1d- ", z); } } 结果为:()A编译失败B-42- -1234- -7.0-C- 42- -1234- - 7.0-D运行时异常被抛出
单选题现有 import java.io.PrintWriter; class DoFormat{ public static void main (String [] args) { int x=42; int y=12345; float Z-7 ; System.out.format("一%4d-", X); System. out.format("-%4d-", y); System. out.format("-%4.ld-",z); } } 结果为:()A编译失败B -42- -1234- -7.0-C - 42- -1234- -7.0-D - 42- -12345- -7.0-E运行时异常被抛出
单选题System.out.format(”Pi is approximately %d.”, Math.PI); What is the result?()A Compilation fails.B Pi is approximately 3.C Pi is approximately 3.141593.D An exception is thrown at runtime.