设为首页    加入收藏

自学考试省级导航

全国 A安徽 B北京 C重庆 F福建 G广东 广西 甘肃 贵州 H河南 河北 湖南 湖北 黑龙江 海南 J江苏 江西 吉林 L辽宁 N内蒙古 宁夏 Q青海 S山东 山西 陕西 四川 上海 T天津
     X新疆 西藏 Y云南 Z浙江 历年真题分类检索

全国2012年10月自学考试Java语言程序设计(一)真题(完美word版)(六)
2015-02-09 20:07:32 来源:91考试网 作者:www.91exam.org 【

五、程序分析题(本大题共5小题,每小题4分,共20分)

32. 阅读下列程序,请写出该程序的输出结果。

public class Test3 2{

public static void main(String[] args){

 int i,j;

 for(i=0;i<5;i++)

{

for(j=1;j<5-i;j++)

System.out.print(" ");

           for(j=0;j<=i;j++)

System.om.print(’"*");

 System. out. Println( );

        }

    }

 }

33. 阅读下列程序,请写出该程序的输出结果。

 public class Test3 3{

   static int x=1;

 int y=0;

 Test33() {

 x++;y++;

 }

 public static void main(String[] args) {

     Test33 st=new Test33();

   System.out.println("x="+x);

 System.out.println("st.y=" +st.y);

 st=new Test33();

 System.out.println("x="+x);

 System.out.println("st.y="+st.y);

   }

 }

Tags:自学考试 历年真题
】【打印繁体】 【关闭】 【返回顶部
上一篇浙江省2013年1月高等教育自学考试.. 下一篇全国2014年4月高等教育自学考试Ja..

网站客服QQ: 960335752 - 14613519 - 48225117