...
Code Block | ||||
---|---|---|---|---|
| ||||
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 | ||||
---|---|---|---|---|
| ||||
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 | ||||
---|---|---|---|---|
| ||||
String myString = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US).format( rightNow.getTime());
/* ...rest of code unchanged...*/
|
...