Skip to content

Commit 9ec2862

Browse files
JJ27actions-user
authored andcommitted
Bot: Prettified Java code!
1 parent a060bac commit 9ec2862

File tree

1 file changed

+7
-8
lines changed
  • src/com/codefortomorrow/advanced/chapter14/examples

1 file changed

+7
-8
lines changed
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.codefortomorrow.advanced.chapter14.examples;
2+
23
import java.io.*;
34

45
public class FileIO {
@@ -12,17 +13,15 @@ public static void main(String[] args) throws IOException {
1213
in = new FileInputStream(file);
1314
out = new FileOutputStream("names_upper.txt");
1415
int c;
15-
while ((c = in.read()) != -1)
16-
out.write(Character.toUpperCase((char)c));
17-
16+
while ((c = in.read()) != -1) out.write(
17+
Character.toUpperCase((char) c)
18+
);
1819
} catch (IOException e) {
1920
System.out.println("An IO Exception occurred.");
20-
e.printStackTrace(); // Prints error output stream.
21+
e.printStackTrace(); // Prints error output stream.
2122
} finally {
22-
if (in != null)
23-
in.close();
24-
if (out != null)
25-
out.close();
23+
if (in != null) in.close();
24+
if (out != null) out.close();
2625
}
2726
}
2827
}

0 commit comments

Comments
 (0)