Skip to content

Commit 90d76dd

Browse files
ARajan1084actions-user
authored andcommitted
Bot: Prettified Java code!
1 parent da5b72a commit 90d76dd

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/com/codefortomorrow/advanced/chapter14/examples/BufferedReaderExample.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* Source: https://beginnersbook.com/2014/01/how-to-read-file-in-java-using-bufferedreader/
99
*/
1010
public class BufferedReaderExample {
11-
public static void main(String[] args) {
1211

12+
public static void main(String[] args) {
1313
BufferedReader br = null;
1414
BufferedReader br2 = null;
1515

@@ -28,19 +28,14 @@ public static void main(String[] args) {
2828

2929
//Second way of reading the file
3030
System.out.println("Reading the file using read() method:");
31-
int num=0;
31+
int num = 0;
3232
char ch;
33-
while((num=br2.read()) != -1)
34-
{
35-
ch=(char)num;
33+
while ((num = br2.read()) != -1) {
34+
ch = (char) num;
3635
System.out.print(ch);
3736
}
38-
39-
}
40-
catch (IOException ioe)
41-
{
37+
} catch (IOException ioe) {
4238
ioe.printStackTrace();
4339
}
4440
}
4541
}
46-

0 commit comments

Comments
 (0)