Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Thread;
- import java.io.*;
- public class Main {
- public static void main(String[] args) throws Exception {
- String absPath = "/Niloy/Test/New/Person.txt";
- String copypath = "/Niloy/Test/New/Student.txt";
- FileReader fileReader = new FileReader(absPath);
- BufferedReader bufferedReader = new BufferedReader(fileReader);
- String a;
- while((a = bufferedReader.readLine()) != null) {
- String parts[] = a.split(",");
- int convert[] = new int[parts.length];
- int max = 0;
- for(int i = 0; i < convert.length; i++) {
- convert[i] = Integer.parseInt(parts[i]);
- }
- for(int i = 0; i < convert.length; i++) {
- if(convert[i] > max) {
- max = convert[i];
- }
- }
- System.out.println(max);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement