public static Console create(boolean interactive) throws IOException {
  consoleInstance.set(new Console(interactive));
  return consoleInstance.get();
}

public static Console create ( boolean interactive ) throws IOException { consoleInstance . set ( new Console ( interactive ) ) ; return consoleInstance . get ( ) ; }
factory method to initialize console with appropriate mode .
