import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
public class Student {
public static void main(String[] argv) throws Exception {
BufferedReader bufRead = new BufferedReader(new FileReader("stdinfo.txt"));
BufferedWriter bufWrite = new BufferedWriter(new FileWriter("newstdinfo.txt"));
int i;
// manipulate the student information from files
do {
i = bufRead.read();
if (i != -1) {
if (Character.isUpperCase((char) i)) {
bufWrite.write(Character.toLowerCase((char) i));
} else {
bufWrite.write((char) i);
}
}
} while (i != -1);
bufRead.close();
bufWrite.close();
}
}
Find all the practical at one place of Gujarat Technological University(GTU) With Solutions.
Sunday, June 30, 2019
Refine the student manager program to manipulate the student information from files by using the BufferedReader and BufferedWriter
Subscribe to:
Post Comments (Atom)
-
A country has a capital city A dining philosopher uses a fork A file is an ordinary file or a directory file Files cont...
-
import java.io.*; public class Dataio { public static void main(String args[]) throws IOException { DataInputStr...
No comments:
Post a Comment