last condition is not test passing. :(
package com.codegym.task.task16.task1630;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.*;
public class Solution {
public static String firstFileName;
public static String secondFileName;
static{
try{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
firstFileName=br.readLine();
secondFileName=br.readLine();//write your code here
}
catch(Exception e){
e.printStackTrace();
}
}
public static void main(String[] args) throws InterruptedException, IOException{
systemOutPrintln(firstFileName);
systemOutPrintln(secondFileName);
}
public static void systemOutPrintln(String fileName) throws InterruptedException, IOException {
ReadFileInterface f = new ReadFileThread();
f.setFileName(fileName);
f.start();
f.join();//write your code here
System.out.println(f.getFileContents());
}
public interface ReadFileInterface {
void setFileName(String fullFileName);
String getFileContents();
void join() throws InterruptedException;
void start();
}
public static class ReadFileThread extends Thread implements ReadFileInterface{
String fullFileName;
String fullcontents="";
public void setFileName(String fullFileName){
this.fullFileName=fullFileName;
}
public String getFileContents(){
return fullcontents;
}
public void run(){
try {
BufferedReader br = new BufferedReader(new FileReader(fullFileName));
while (br.ready()) {
String line = br.readLine();
fullcontents += line + " ";
}
br.close();
} catch (IOException e){
e.getMessage();
}
}
public void start(){
}
}//write your code here
}