I don't understand what's wrong.
package pl.codegym.task.task18.task1818;
/*
Dwa w jednym
*/
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
String file1 = sc.nextLine();
String file2 = sc.nextLine();
String file3 = sc.nextLine();
FileOutputStream file1OutputStream = new FileOutputStream(file1);
FileInputStream file2InputStream = new FileInputStream(file2);
FileInputStream file3InputStream = new FileInputStream(file3);
byte[] buffer = new byte[file2InputStream.available()];
int count = file2InputStream.read(buffer);
file1OutputStream.write(buffer, 0, count);
buffer = new byte[file3InputStream.available()];
count = file3InputStream.read(buffer);
file1OutputStream.write(buffer, 0, count);
sc.close();
file1OutputStream.close();
file2InputStream.close();
file3InputStream.close();
}
}