06 2019 档案

第四次实训作业
摘要:1 package LHB.inherit; 2 3 public class Electricityfees 4 { 5 private int lastmonth,thismonth;/*上月电表读数,本月电表读数*/ 6 public Electricityfees() 7 { 8 9 } 10 public Electri... 阅读全文

posted @ 2019-06-16 14:03 胡先耀 阅读(104) 评论(0) 推荐(0)

IO流
摘要:1 package Suchas; 2 import java.io.*; 3 4 public class FileIO 5 { 6 public FileIO(String str) 7 { 8 File f = new File("data.txt"); 9 try 10 { 11 ... 阅读全文

posted @ 2019-06-16 14:00 胡先耀 阅读(120) 评论(0) 推荐(0)

异常处理
摘要:1.编写一个类ExceptionTest,在main方法中使用try-catch-finally语句结构实现: 在try语句块中,编写两个数相除操作,相除的两个操作数要求程序运行时用户输入; 在catch语句块中,捕获被0除所产生的异常,并输出异常信息; 在finally语句块中,输出一条语句 阅读全文

posted @ 2019-06-12 16:06 胡先耀 阅读(126) 评论(0) 推荐(0)

第一次实训作业
摘要:(1) pqckage bbb; public class java1{ public static void main(String[] args){ int a; a=5; if(a%2==0) System.out.println("a为偶数"); else System.out.printl 阅读全文

posted @ 2019-06-12 16:01 胡先耀 阅读(224) 评论(0) 推荐(0)

第六次作业
摘要:1 package WindowBuilder; 2 3 import java.awt.*; 4 import java.awt.event.*; 5 import javax.swing.*; 6 import javax.swing.border.EmptyBorder; 7 import j 阅读全文

posted @ 2019-06-12 15:27 胡先耀 阅读(142) 评论(0) 推荐(0)

第五次作业
摘要:1 package Exception; 2 import java.util.Scanner; 3 public class ExceptionTest 4 { 5 public static void main(String[] args) 6 { 7 Scanner sc=new Scanne 阅读全文

posted @ 2019-06-12 15:26 胡先耀 阅读(123) 评论(0) 推荐(0)

4
摘要:package LHB.inherit; public class Electricityfees { private int lastmonth,thismonth;/*上月电表读数,本月电表读数*/ public Electricityfees() { } public Electricityfees(int lastmonth,int th... 阅读全文

posted @ 2019-06-12 15:22 胡先耀 阅读(129) 评论(0) 推荐(0)

第三次作业
摘要:ackage bbb;2 public class Student3 {4 private String name;5 private char sex;6 private int age;7 private String studentId;8 private double scores[]=ne 阅读全文

posted @ 2019-06-12 15:17 胡先耀 阅读(80) 评论(0) 推荐(0)