- 117
- 0
- 约3.62千字
- 约 6页
- 2017-05-11 发布于贵州
- 举报
年9月份考试Jva程序设计第三次作业
2014年9月份考试Java程序设计第三次作业一、程序阅读题(本大题共30分,共 5 小题,每小题 6 分)1. import java.util.*; class Test?{public static void main(String args[]) {Stack mystack=new Stack(); mystack.push(new Integer(1));?mystack.push(new Integer(1)); int k=1; while(k=4) {Integer F1=(Integer)mystack.pop();int f1=F1.intValue();?Integer F2=(Integer)mystack.pop();int f2=F2.intValue();?Integer temp=new Integer(f1+f2);?System.out.println(+temp.toString());?mystack.push(temp);mystack.push(F2);k++; } } }2. interface Foo{ int k=0;?}?public class test implements Foo{ public static void main(String args[]){?
原创力文档

文档评论(0)