问题 单项选择题

执行下面程序后输出的正确结果是( )。
public class Test
public static void main(String args[])
byte x=3,y=4;
long r=80L:
System.out.print(r/y);
System.out.print(",");
System.out.print(x/y);

A.20.0,1

B.20.0,1.0

C.20,0

D.20,1.0

答案

参考答案:C

解析: 如果两个操作数全为整型,那么,只要其中一个为long型,则表达式结果为long型;其他情况下,即使两个操作数全是byte或short型,表达式结果也是int型:如果操作数为浮点型,那么只要其中一个为double型,表达式结果就是double型;只有两个操作数全是float型或其中一个是float型而另外一个是整型时,表达式结果是float型。

阅读理解

阅读下面的短文,选择正确的答案。

        Jack and his mother are sitting at the table. They are having lunch. "I don't like this soup. I don't want to 

eat it." says Jack and he puts down the spoon. "All right." says his mother. "Don't eat it."          

        After lunch Jack and his mother work in the field. They work so hard.            

        In the evening, Jack's mother gives him a bowl of soup. "Oh, this soup is delicious." Says Jack. "It is the 

same soup." says his mother.

1. Where are Jack and his mother sitting ?                .[ ]

A. In the room                                     

B. At the table                  

C. On the desk                                

D. Under the tree

2. What are they doing?   They're               .[ ]

A. having lunch                                   

B. watching TV                 

C. reading English                          

D. talking 

3. Does Jack like this soup?                .[ ]

A. Yes, he does                               

B. No, he doesn't    

C. He likes the soup                                                                             

D. He doesn't like it                     

4.               Jack and his mother work in the field. [ ]

A. In the morning     

B. After class                                         

C. Before lunch                                         

D. After lunch

5. In the evening, Jack's mother gives him              .[ ]

A. another bowl of soup   

B. the same cake  

C. the same bowl of soup                                                                      

D. another cake             

单项选择题