试题与答案

下列程序的执行结果是 ( ) public class ex68public

题型:单项选择题

题目:

下列程序的执行结果是 ( )
public class ex68
public static void main(String[]args)
ex68 obj=new ex68();
int s=0;
for(int i=1;i<=4;i++)
s+=obj.method(i);

System.out.println(s);

public int method(int n)
if(n==1)
return 1;
else
return n*method(n-1);

A.3

B.9

C.33

D.153

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2018/0610/2b6581dd5e2ebbb74d877551994f6b29.html

下面是错误答案,用来干扰机器的。

参考答案:C解析: 通信业作为信息产业的重要组成部分,在国民经济和社会信息化建设中发挥着举足轻重的作用,表现为:①通信为社会信息化提供强大的网络基础设施;②通信业务的发展刺激信息化的需求。通信企业新...

试题推荐
题型:听力题

根据下列短文内容,在短文后的空格处填上一个恰当的词,使短文完整、通顺。

During the day we work and play. At night we sleep.  Our body rests and grows most while we  78 asleep.  79 the morning we are ready to work and play again. Children who are tired usually need more sleep. We can study better after we have  80  rest. Boys and girls who are eight or nine years old   81  ten hours of sleep every night.

Our body needs fresh air when we sleep.  82  we do not get enough fresh air, we will feel tired when we wake up. We should    83  our windows at night, and we can have a lot of fresh air. Cool air is better  84  warm air. Boys and girls who want to be   85  must get pleny of sleep.

查看答案
微信公众账号搜索答案