Skip to content

Commit d296dfe

Browse files
phrdangactions-user
authored andcommitted
Bot: Prettified Java code!
1 parent f15d68e commit d296dfe

File tree

14 files changed

+72
-96
lines changed

14 files changed

+72
-96
lines changed

src/com/codefortomorrow/advanced/chapter14/practice/Average.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.codefortomorrow.advanced.chapter14.practice;
22

3-
43
/*
54
The file “numbers.txt” has 100 random numbers
65
(one on each line). Use file i/o to find the

src/com/codefortomorrow/advanced/chapter14/practice/Lexico.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.codefortomorrow.advanced.chapter14.practice;
22

3-
43
/*
54
Practice: Use File I/O to compare two files lexicographically.
65
Lexicographical order is very similar to alphabetical order,

src/com/codefortomorrow/advanced/chapter16/solutions/Access.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.codefortomorrow.advanced.chapter16.solutions;
22

3-
import java.util.LinkedList;
43
import java.util.ArrayList;
4+
import java.util.LinkedList;
55

66
/*
77
Using the methods outlined in the “Benefits of LinkedLists” section,

src/com/codefortomorrow/advanced/chapter16/solutions/Sort.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.codefortomorrow.advanced.chapter16.solutions;
22

3-
import java.util.LinkedList;
43
import java.util.Arrays;
4+
import java.util.LinkedList;
55

66
/*
77
Write a method which takes in a LinkedList of Strings

src/com/codefortomorrow/beginner/chapter1/practice/Comments.java

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
/**
44
* @author ArmeetJatyani
55
* March 2021
6-
*
7-
* You'll be writing your first ever comment today!
8-
* What we'll go over:
6+
*
7+
* You'll be writing your first ever comment today!
8+
* What we'll go over:
99
* - single line comments
1010
* - multi line comments
1111
*/
1212

13-
// a class is an "object" where we will place all our code inside
14-
public class Comments {
15-
// the main method (below) is the first thing that runs when your program is run
13+
// a class is an "object" where we will place all our code inside
14+
public class Comments {
15+
16+
// the main method (below) is the first thing that runs when your program is run
1617
public static void main(String[] args) {
1718
// this is a single line comment, I can write anything here
1819
// single line comments aren't run by Java!
@@ -22,17 +23,11 @@ public static void main(String[] args) {
2223
* this is a multi
2324
* line
2425
* comment
25-
*
26+
*
2627
* It can span across multiple lines!
2728
*/
2829

2930
// YOUR ASSIGNMENT: write 1 single-line comment and 1 multi-line comment on the lines below...
3031

31-
32-
33-
34-
35-
36-
3732
}
38-
}
33+
}

src/com/codefortomorrow/beginner/chapter1/practice/HelloWorld.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
/**
44
* @author ArmeetJatyani
55
* March 2021
6-
*
7-
* Welcome to Java!
6+
*
7+
* Welcome to Java!
88
* This may be your first ever java program!
99
* We'll begin your journey with the infamous Hello World program!
1010
*/
1111

12-
// a class is an "object" where we will place all our code inside
13-
public class HelloWorld {
12+
// a class is an "object" where we will place all our code inside
13+
public class HelloWorld {
14+
1415
// the main method (below) is the first thing that runs when your program is run
1516
public static void main(String[] args) {
1617
// write code here (replace the "" with "Hello World!")
1718
System.out.println("");
1819
}
19-
}
20+
}

src/com/codefortomorrow/beginner/chapter1/solutions/Comments.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
/**
44
* @author ArmeetJatyani
55
* March 2021
6-
*
7-
* You'll be writing your first ever comment today!
8-
* What we'll go over:
6+
*
7+
* You'll be writing your first ever comment today!
8+
* What we'll go over:
99
* - single line comments
1010
* - multi line comments
1111
*/
1212

13-
// a class is an "object" where we will place all our code inside
14-
public class Comments {
15-
// the main method (below) is the first thing that runs when your program is run
13+
// a class is an "object" where we will place all our code inside
14+
public class Comments {
15+
16+
// the main method (below) is the first thing that runs when your program is run
1617
public static void main(String[] args) {
1718
// this is a single line comment, I can write anything here
1819
// single line comments aren't run by Java!
@@ -22,7 +23,7 @@ public static void main(String[] args) {
2223
* this is a multi
2324
* line
2425
* comment
25-
*
26+
*
2627
* It can span across multiple lines!
2728
*/
2829

@@ -31,8 +32,8 @@ public static void main(String[] args) {
3132
// Hi my name is Armeet!
3233

3334
/**
34-
* I like teaching Java, and
35+
* I like teaching Java, and
3536
* good luck on your journey!
3637
*/
3738
}
38-
}
39+
}

src/com/codefortomorrow/beginner/chapter1/solutions/HelloWorld.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
/**
44
* @author ArmeetJatyani
55
* March 2021
6-
*
7-
* Welcome to Java!
6+
*
7+
* Welcome to Java!
88
* This may be your first ever java program!
99
* We'll begin your journey with the infamous Hello World program!
1010
*/
1111

12-
// a class is an "object" where we will place all our code inside
13-
public class HelloWorld {
12+
// a class is an "object" where we will place all our code inside
13+
public class HelloWorld {
14+
1415
// the main method (below) is the first thing that runs when your program is run
1516
public static void main(String[] args) {
1617
// write code here (replace the "" with "Hello World!")
1718
System.out.println("Hello World!");
1819
}
19-
}
20+
}

src/com/codefortomorrow/beginner/chapter2/practice/ApplesOranges.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,22 @@
33
/**
44
* @author ArmeetJatyani
55
* March 2021
6-
*
6+
*
77
* Print out the number of apples and oranges!
88
*/
99

10-
public class ApplesOranges {
10+
public class ApplesOranges {
11+
1112
public static void main(String[] args) {
1213
// write your code here
13-
14+
1415
// define an integer variable called numOranges with value 10 (line 15)
1516

16-
1717
// define an integer variable called numApples with value 24 (line 18)
1818

19-
2019
// print out number of oranges using variables, output: "I have 10 oranges." (line 21)
2120

22-
2321
// print out number of apples using variables, output: "I have 24 apples." (line 24)
2422

25-
2623
}
27-
}
28-
24+
}

src/com/codefortomorrow/beginner/chapter2/practice/VariableTypes.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,26 @@
33
/**
44
* @author ArmeetJatyani
55
* March 2021
6-
*
6+
*
77
* Define different types of variables
88
*/
99

10-
public class VariableTypes {
10+
public class VariableTypes {
11+
1112
public static void main(String[] args) {
1213
// write your code here
13-
14+
1415
// define an integer variable on line 15
1516

16-
1717
// define a float variable on line 18
1818

19-
2019
// define a double variable on line 21
2120

22-
2321
// define a boolean variable on line 24 (Hint: true/false)
2422

25-
2623
// define a character variable on line 27
2724

28-
29-
// define a string variable on line 30
30-
25+
// define a string variable on line 30
3126

3227
}
33-
}
34-
28+
}

0 commit comments

Comments
 (0)