问题 单项选择题

下列赋值语句中错误的是

A.float f=11.1f;

B.double d=5.3E12;

C.char c='\r';

D.byte bb=433;

答案

参考答案:D

解析: 本题考查Java语言中的赋值运算。赋值运算符(=)是把一个表达式的值赋给一个变量,赋值运算符两侧的类型不一致的情况下,如果左侧变量类型的级别高,则右侧的数据被转化为与左侧相同的高级数据类型后赋给左侧变量:否则,需要使用强制类型转换运算符。 选项A是float常量;选项B是double型;选项C是一个字符型常量,需要注意,这里的“\”是转移字符,“\r”,表示回车,并不是字母r;选项D中433超过了byte类型的范围,所以是错误的。

阅读理解

A kind of little cars may some day take the place of today’s cars. If everyone drives such cars in the future,there will be less pollution in the car. There will also be more space for parking cars in cities,and the streets will be less crowded. Three such cars can fit in the space now needed for one car of the usual size.

The little cars will cost much less to own and to drive. Driving will be safer,too,as these little cars can go only 65 kilometers an hour. The cars of the future will be fine for getting around a city,but they will not be useful for long trips. Little cars will go 450 kilometers before needing to stop for more gasoline.

If big cars are still used along with the small ones,two sets of roads will be needed in the future. Some roads will be used for the big,fast cars and other roads will be needed for the slower,small ones.

小题1:There is much pollution in the car today because ________.

A.people drive big cars

B.people drive little cars

C.the cars go 65 kilometers an hour

D.the cars can go 450 kilometers an hour小题2:The usual size of cars today is ________that of future cars.

A.much smaller than

B.much the same as

C.three times as large as

D.a little larger than小题3:We can learn from the passage that________.

A.big cars cost less to own and to drive

B.big cars are not useful for long trips

C.the cars of the future will be much smaller than today’s cars

D.small cars are faster than big ones小题4:The street will be less crowded because ________.

A.there will be fewer cars in the future

B.there will be fewer passengers in the street

C.driving future cars will be safe

D.future cars will be much smaller小题5:Two sets of roads may be needed in the future because ________.

A.there will be too many cars in the future

B.more and more people will get around a city

C.big cars and little cars may be used along with each other

D.it looks more beautiful to have two sets of roads

单项选择题