(JAVA) Returns a new String consisting of all of the letters of s, but where tab characters (\'\\t\') are replaced with n spaces public static String tabToSpace(String s, int n) { } public static void main(String args[]) { System.out.print(\"Enter a word: \"); input = scan.nextLine(); System.out.println(tabToSpace(, )) Solution TabReplace.java import java.util.Scanner; public class TabReplace { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner scan = new Scanner(System.in); System.out.println(\"Enter a word :\"); String input = scan.nextLine(); System.out.println(\"Enter Number of Spaces :\"); int n = scan.nextInt(); System.out.println(tabToSpace(input, n)); } public static String tabToSpace(String s, int n){ String spaces = \"\"; String newString = \"\"; for(int i=0; i<n; i++){ spaces = spaces + \" \"; } for(int i=0; i<s.length(); i++){ if(s.charAt(i) == \'\\t\') newString = newString + spaces; else newString = newString + s.charAt(i); } return newString; } } Output: Enter a word : Hi  Good Morning!  how are     you Enter Number of Spaces : 1 Hi Good Morning! how are you .