Day1227二进制流对象流反射

二进制流
DataInputStream dis=new DataInputStream(new FileInputStream(“D:\mydoc\star.jpg”));
DataOutputStream dos=new DataOutputStream(new FileOutputStream(“D:\aa\s.jpg”));
对象流
ObjectOutputStream oos=new ObjectOutputStream(new FileOutputStream(“student.txt”));
ObjectInputStream ois=new ObjectInputStream(new FileInputStream(“student.txt”));
反射:
java反射机制编译时并不确定那个类被加载了,而是在程序运行时才加载,探知使用,这样的特点就是反射

猜你喜欢

转载自blog.csdn.net/weixin_43766697/article/details/85302026