Compilation fails.
Pi is approximately 3.
Pi is approximately 3.141593.
An exception is thrown at runtime.
第1题:
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.运行时异常被抛出
第2题:
A.Compilationfails.
B.Piisapproximately3.
C.Piisapproximately3.141593.
D.Anexceptionisthrownatruntime.
第3题:
According to Figure 3, clasts and matrix particles having diameters greater than or equal to 0.5 mm made up approximately what percent of the total mass of the combined samples?
A.13%
B.33%
C.63%
D.83%
第4题:
A(73)is a value that never changes, for example: the value of Pi(approximately 3.14).
A.variable
B.string
C.Boolean
D.constant
第5题:
A.Anexceptionisthrownatruntime.
B.Piisapproximately3.
C.Piisapproximately3.141593.
D.Compilationfails.
第6题:
现有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.运行时异常被抛出
第7题:
[说明] 下面是一段java代码,运行结果如图11-8所示。
程序代码如下:
(1)Java.awt.Graphics;
(2)Java.applet.Applet;
// ////////////////////////////////////////////
// Display y=sin(x)
public class J_DrawSin (2) Applet
{
public void paint(Graphics g)
{
double d, tx;
int x, y, x0, y0;
d=Math.PI/100; // Set step(Set the unit in x direction)
x0=y0=0;
(3)(tx=0, x=20; tx<2*Math.PI; tx+=d,x++)
{
y=120-(int)(Math.sin(tx)*50+60);
if(x>20)
g.drawLine(x0, y0, x, y);
x0=x;
y0=y;
}
g.drawstring("y=sin(x)", 10, 70);
} //End of method: paint
} //End of class: J_HelloApplet
<!-----------------------AppletExample.html------------------->
<HTML>
<HEAD>
<TITLE>
An applet Example ---- Hello Applet!
</TITLE>
</HEAD>
<BODY>
<(4)CODE="J_DrawSin.class" WIDTH=300 HEIGHT=120>
</APPLET>
</BODY>
</HTML>
把所缺代码补充完整。
第8题:
If Trial 4 had been extended, at approximately what time would 0.45 mL of 0 2 have reacted?
A.70 sec
B.140 sec
C.240 sec
D.270 sec
第9题:
在JavaScript中,下面哪一条语句在页面上显示圆周率π。()
A.document.write(Math.Pi)
B.document.write(Math.pi)
C.document.write(Math.PI)x
第10题: