Employee.java package cn.employee_io; public class Employee { private String empId; private String name; private int age; private double salary; public Employee() { super(); } public Employee(String empId, String name, int age, double salary) { super…
package cn.employee; import java.io.Serializable; public class Employee implements Serializable{ private static final long serialVersionUID = 1L; private int empNo; private String name; private String department; public Employee() { super(); } public…
package cn.gee; public class Emp { private String id;//员工编号 一般是唯一的 private String sname; private int age; private float salary; public Emp(){ } public Emp(String id, String sname, int age, float salary) { super(); this.id = id; this.sname = sname; th…
package cn.employee_io; import java.io.Serializable; public class Employee implements Serializable{ /** * */ private static final long serialVersionUID = 1L; private String empId; private String name; private int age; private double salary; public Em…
package cn.employee; public class Employee { private int empNo; private String name; private String department; public Employee() { super(); } public Employee(int empNo, String name, String department) { super(); this.empNo = empNo; this.name = name;…
一.集合: 1. 集合框架: 1)Collection (1)List:有序的,有索引,元素可重复. (add(index, element).add(index, Collection).remove(index).set(index,element).get(index).subList(from, to).listIterator()) ①ArrayList:底层是数组结构,查询快,增删慢,不同步. ②LinkedList:底层是链表结构,增删快,查询慢,不同步. addFist():ad…
package com.itheima.demo07.Prop; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.util.Properties; import java.util.Set; /* java.util.Properties集合 extends Hashtable<k,v> implements Map<k,v> Pr…
1. 用Reader模拟BufferedReader的readLine()功能:   readLine():一次读取一行,根据换行符判断是否结束,只返回内容,不返回换行符 2. 代码实现和思路分析: package cn.itcast_08; import java.io.IOException; import java.io.Reader; /* * 用Reader模拟BufferedReader的readLine()功能 * * readLine():一次读取一行,根据换行符判断是否结束,只…
哈哈!!我又来了!!这个里面没有运用readLine 的方法!!纯手打!! import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.Reader; import java.nio.Buffer; public class work1 { /** * @param args *…
1.1,什么是io流? 流是一组有顺序的,有起点和终点的字节集合,是对数据传输的总称或抽象.即数据在两设备间的传输称为流,流的本质是数据传输,根据数据传输特性将流抽象为各种类,方便更直观的进行数据操作. 1.2,流按类型分为两种: * 字节流 : 字节流可以操作任何数据,因为在计算机中任何数据都是以字节的形式存储的 * 字符流 : 字符流只能操作纯字符数据,比较方便. 1.2.1,io流的结构图: 1.3,IO流常用父类: * 字节流的抽象父类: * 字符流的抽象父类: * InputStrea…