当前位置:Java认证考试综合练习题库

问题:

[单选]

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.1d- ", z);
}
} 
结果为:() 

参考答案:

●  参考解析

本题暂无解析

在线 客服