import java.io.Console;
import java.io.FileOutputStream;
import java.io.IOException;

public class BasicJava {

  public static void main(String[] args) {
      int[] myarr = null;
      int arrLen = 0;
      
      if (args.length > 0);                 // This IF statement has empty branches.
          assert args[0] == "hello";        // (note misleading indentation on this line)

      BasicJava objA = new BasicJava();
      BasicJava objB = new BasicJava();
      if (objA!=objB)                       // Test always evaluates to TRUE.
          arrLen = myarr.length;            // myarr is always null.

      Console con = System.console();
      if (con == null) return;
      con.printf("Enter file name");
      String fName = con.readLine();
      try (FileOutputStream f = new FileOutputStream(fName) ) {  
          f.write(arrLen);
      } catch (IOException e) {
          con.printf("Caught an IOException");
      }
  }
}
