не понятно что он еще хочет...
package com.javarush.task.task16.task1630;
import java.io.*;
public class Solution {
public static String firstFileName;
public static String secondFileName;
static {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
try {
firstFileName = r.readLine();
secondFileName = r.readLine();
} catch (IOException e) {
e.printStackTrace();
}
}
public static void main(String[] args) throws InterruptedException {
systemOutPrintln(firstFileName);
systemOutPrintln(secondFileName);
}
public static void systemOutPrintln(String fileName) throws InterruptedException {
ReadFileInterface f = new ReadFileThread();
f.setFileName(fileName);
f.start();
f.join();
System.out.println(f.getFileContent());
}
public interface ReadFileInterface {
void setFileName(String fullFileName);
String getFileContent();
void join() throws InterruptedException;
void start();
}
public static class ReadFileThread extends Thread implements ReadFileInterface {
private String FileName = null;
String content = " ";
@Override
public void setFileName(String fullFileName) {
this.FileName = fullFileName;
}
@Override
public String getFileContent() {
return content;
}
public void run(){
try {
BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(FileName)));
String s = null;
while ((s = r.readLine())!= null){
content = content + s + " ";
}
r.close();
}
catch (IOException e) {
}
}
}
}