5th sem OOPJ Create a class called Student. Write a student manager program to manipulate the student information from files by using DataInputStream and DataOutputStream.

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 *
 * @author Yash
 */

public class pra13 {
    public static void main(String arg[]) throws FileNotFoundException, IOException{
        DataInputStream din = new DataInputStream(new FileInputStream("new.txt"));
        DataOutputStream dout = new DataOutputStream(new FileOutputStream("output1.txt"));
       
        String str;
       
        while((str=din.readLine()) != null){
        String s2 = str.toUpperCase();
        dout.writeBytes(s2 + "\n");
        }
        din.close();
        dout.close();
    }
}

Comments

Popular posts from this blog

5th sem OOPJ Write an interactive program to print a diamond shape. For example, if user enters the number 3, the diamond will be as follows:

SQL Lab1: Create a Database Table for DayCare

SQL Lab 11