Q1. Complete the extractInfo method below (do not change the…

Question Answered step-by-step Q1. Complete the extractInfo method below (do not change the… Q1. Complete the extractInfo method below (do not change the provided signature), which receives a String as a parameter, corresponding to a file name. The method must open that file, extract the required information (described below) from each line and output it to the console (using System.out…). You can safely assume that each line of the input file will always start with 5 integer numbers, followed by at least 3 words. All the different numbers and words on a line are always separated by a single blank space. For each line of the input file, your method must:- extract the first and fifth numbers, and calculate their sum- extract the first 3 words.- print to the console those 4 tokens on the same line (sum and 3 words), separated by a blank space For example, if the input file contains this information: 50 5 17 6 54 Because no matter what you say in life100 15 60 1 32 the truth will always be the truth2 5 7 20 35 You know when someone is telling the truth-22 -11 -8 2 400 you look in the eyes-7 88 5 22 16 I have a tendency to believe people25 -25 77 109 8 Quote from JCVD The output to the console will be: 104 Because no matter132 the truth will37 You know when378 you look in9 I have a33 Quote from JCVD  public static void extractInfo(String fileName){ Computer Science Engineering & Technology Java Programming COMP 1020 Share QuestionEmailCopy link Comments (0)