熊猫题库

|设为首页 |收藏本站 |切换到宽版
注册
查看: 441|回复: 0

辽宁电大《Java语言程序设计》形考任务1-4【答案】

[复制链接]

5133

主题

5133

帖子

1万

积分

论坛元老

Rank: 8Rank: 8

积分
15867
发表于 2022-6-30 02:46:16 | 显示全部楼层 |阅读模式
形考作业一
1、请说说你对JVM的了解。
2、char型变量中能不能存贮一个中文汉字?请说出理由。
形考作业二

1.阅览下面的程序,剖析代码是不是可以编译经过,假如能编译经过,请列出运转的成果。不然请阐明编译失利的缘由。
代码一:
class A {
private int secret = 5;
}
public class Test1 {
public static void main(String[] args) {
   A a = new A();
   System.out.println(a.secret++);
  }
}

代码二:
public class Test2 {
public static void main(String[] args) {
   try {
   int x = 2 / 0;
   System.out.println(x);
   } catch (Exception e) {
   System.out.println("进入catch代码块");
   } finally {
   System.out.println("进入finally代码块");
   }
  }
}


形考作业二
1.阅览下面的程序,剖析代码是不是可以编译经过,假如能编译经过,请列出运转的成果。不然请阐明编译失利的缘由。
代码一:
class A {
private int secret = 5;
}
public class Test1 {
public static void main(String[] args) {
   A a = new A();
   System.out.println(a.secret++);
  }
}
代码二:
public class Test2 {
public static void main(String[] args) {
   try {
   int x = 2 / 0;
   System.out.println(x);
   } catch (Exception e) {
   System.out.println("进入catch代码块");
   } finally {
   System.out.println("进入finally代码块");
   }
  }
}


形考作业四
1、简述你对IP地址的知道。
2、简述JDBC编程的首要过程
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

站点统计 | 统计 | QQ | Archiver| 熊猫题库 |网站地图

Copyright © 2001-2013 Comsenz Inc.   All Rights Reserved. Powered by 熊猫题库