In: Computer Science
Implement the following methods in Java:
a. A method named MergeFileswith the following signature that gets two file names and write the content of the first file (sourceFile) into the beginning of the second file (destinationFile. For example, if sourceFile contains “Hello ” and destinationFile contains “World!”, this method must keep sourceFile as it is, but replace the content of the second file by “Hello World!”.public static voidMergeFiles(String sourceFile, String destinationFile)
b. A recursive method with the following signature that gets an Arraylist of Strings and starting from the second node, deletes all alternate nodes of it. The method returns an Arraylist containingthe shortened listin reverseorderas the output.public static ArrayList<String> RecursiveReverseDeleteAlt (ArrayList<String> list)
A). A method named MergeFileswith the following signature that gets two file names and write the content of the first file (sourceFile) into the beginning of the second file (destinationFile. For example, if sourceFile contains “Hello ” and destinationFile contains “World!”, this method must keep sourceFile as it is, but replace the content of the second file by “Hello World!”.public static voidMergeFiles(String sourceFile, String destinationFile)
B). A recursive method with the following signature that gets an Arraylist of Strings and starting from the second node, deletes all alternate nodes of it. The method returns an Arraylist containingthe shortened listin reverseorderas the output.public static ArrayList<String> RecursiveReverseDeleteAlt (ArrayList<String> list)
note: plzzz don't give dislike.....plzzz comment if you have any problem i will try to solve your problem.....plzzz give thumbs up i am in need.