Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: code formatting

...

Code Block
bgColor#ccccff
langjava
  public static void main(String[] args) throws IOException {
    Charset encoding = Charset.forName("UTF8");
    BufferedReader reader = new BufferedReader(new InputStreamReader( new FileInputStream(inputFile), encoding));
    PrintWriter writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(outputFile), encoding));

    int line = 0;

    /* rest of code unchanged */

...

Code Block
bgColor#ffcccc
langjava
public static void isJune(Date date) {
  String myString = DateFormat.getDateInstance().format( date);
  System.out.println("The date is " + myString);
  if (myString.startsWith("Jun ")) {
    System.out.println("Enjoy June!");
  } else {
    System.out.println("It's not June.");
  }
}

...

Code Block
bgColor#ccccff
langjava
String myString = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US).format( rightNow.getTime());
/* ...rest of code unchanged...*/

...