Fill in the code to complete the following method for comput…

Fill in the code to complete the following method for computing factorial.  /** Return the factorial for a specified index */  public static long factorial(int n) {    if (n == 0) // Base case      return 1;    else      return _____________; // Recursive call  }

After the following program is finished, how many bytes are…

After the following program is finished, how many bytes are written to the file t.dat?import java.io.*;public class Test {  public static void main(String[] args) throws IOException {    DataOutputStream output = new DataOutputStream(      new FileOutputStream(“t.dat”));    output.writeChars(“ABCD”);    output.close();  }}