I need help getting the following code to compile: import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class ScrambleMain { public static void main(String[] args) { File file = new File(\"paragraph.txt\"); String scrambledString = \"\"; try { Scanner sc = new Scanner(file); while (sc.hasNextLine()) { String line = sc.nextLine(); String lineArr[] = line.split(\" \"); System.out.println(\"input string :\" + line); for (int i = 0; i < lineArr.length; i++) { String str = lineArr[i]; if (str.length() > 3) { scrambledString += scramble(str) + \" \"; } else { scrambledString += str + \" \"; } } } System.out.println(\"scrambledString : \" + scrambledString); sc.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } } public static String scramble(String str) { StringBuilder newStringBuilder = new StringBuilder(); char firstLetter = str.charAt(0); char lastLetter = str.charAt(str.length() - 1); StringBuilder stringBuilder = new StringBuilder(str.substring(1, str.length() - 1)); while (stringBuilder.length() > 0) { int n = (int) (Math.random() * stringBuilder.length()); newStringBuilder.append(stringBuilder.charAt(n)); stringBuilder.deleteCharAt(n); } return firstLetter + newStringBuilder.toString() + lastLetter; } } Solution The code works fine. Just give a proper input file with some words in it. The following is the result of running the program with the input file contains a word \"computer\" : output ---------------- input string :computer scrambledString : cmpeuotr .