一、选择题
1.B)this
2.C)do
3.C)next
4.B)$x
5.D)5abc
6.A)double
7.D)6.0f
8.B)char chr=?\uabcd?;
9.C)String s1=…abcd\0?;
10.D)f1=3.14F
11.C)100.0+10
12.A)2^5
13.C)9
二、填空题
1.
(1)(ture)
(2)(false)
(3)(false)
(4)(ture)
2.求下面表达式的值:
(1) (20.0)
(2) (13)
(3) (158.0)
(4) (0)
(5) (false)
三、编程
1.试编写一程序,读入4个数据,输出其中的最大数。参考答案:
import java.util.*;
public class example1{
public static void main(String args[]) throws IOException {
Scanner s=new Scanner(System.in);
System.out.print(“请输入4个整数:”);
int x1=s.nextInt();
int x2=s.nextInt();
int x3=s.nextInt();
int x4=s.nextInt();