Which proposed code change will result in this code properly inserting commas?

public static void writeThreeDigits(int n) {
  System.out.print(n / 100);	
  System.out.print((n / 10) % 10);		
  System.out.print(n % 10);
} 

public static void writeWithCommas(int n) {	
  if (n < 1000)
    System.out.print(n);			
  else { 
    writeThreeDigits(n%1000);
    System.out.print(",");	
    writeWithCommas(n/1000);
  }
}
Interchange the line: writeThreeDigits(n%1000); with the line: writeWithCommas(n/1000);.
  • Change the line: writeWithCommas(n/1000); to be writeWithCommas(n%1000);
  • Change the test in writeWithCommas to be if (n > 1000)
  • Interchange the line: System.out.print(n/100); with the line: System.out.print(n%10); in writeThreeDigits.
  • Replace the line: writeThreeDigits(n%1000); with the line: writeThreeDigits(n/1000);.

The problem is that the blocks of digits are put in reverse order.