11 2016 档案

 
09异常处理
摘要:动手动脑一: 代码: import javax.swing.*; class AboutException { public static void main(String[] a) { int i=1, j=0, k;//double可以被0整除,整数和浮点型运算不一样 k=i/j; try { 阅读全文
posted @ 2016-11-25 19:57 杨寒 阅读(131) 评论(0) 推荐(0) 编辑
08 多态课后作业
摘要:知识点一:类型转换 源代码: class Mammal{} class Dog extends Mammal {} class Cat extends Mammal{} public class TestCast { public static void main(String args[]) { 阅读全文
posted @ 2016-11-18 19:46 杨寒 阅读(137) 评论(0) 推荐(0) 编辑
07继承与接口
摘要:1、运行TextInherists.java 示例,观察输出,注意总结父类与子类之间构造方法的的调用关系,修改parent构造方法的代码,显式调用grandparent另一个构造函数。 源代码: class GrandParent{ public GrandParent(){ System.out. 阅读全文
posted @ 2016-11-11 23:33 杨寒 阅读(168) 评论(0) 推荐(0) 编辑
数组课后作业
摘要:实验一:棋盘制作 程序代码: 程序截图: 实验二:将小写数字转化为大写 程序代码: 程序截图: 实验:随机数组相加 设计思想:以时间为种子得到10个随机数,相加求和 程序流程图: 程序代码: 程序截图: 阅读全文
posted @ 2016-11-06 10:48 杨寒 阅读(187) 评论(0) 推荐(0) 编辑

 

点击右上角即可分享
微信分享提示