Skip to content

Commit 8f6745c

Browse files
authored
Merge pull request #26 from code4tomorrow/fix-imports
2 parents 5e1a52e + d296dfe commit 8f6745c

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

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

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

3-
import java.io.*;
4-
53
/*
64
The file “numbers.txt” has 100 random numbers
75
(one on each line). Use file i/o to find the

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

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

3-
import java.io.*;
4-
53
/*
64
Practice: Use File I/O to compare two files lexicographically.
75
Lexicographical order is very similar to alphabetical order,

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

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

3-
import java.util.*;
3+
import java.util.ArrayList;
4+
import java.util.LinkedList;
45

56
/*
67
Using the methods outlined in the “Benefits of LinkedLists” section,
@@ -15,6 +16,7 @@
1516

1617
public class Access {
1718

19+
@SuppressWarnings("unused")
1820
public static void main(String[] args) {
1921
long a, b;
2022

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

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

3-
import java.util.*;
3+
import java.util.LinkedList;
4+
import java.util.Scanner;
45

56
/*
67
Create a LinkedList of Strings, and ask the user to
@@ -38,5 +39,7 @@ public static void main(String[] args) {
3839
list.add(0, "Apple");
3940
list.add(list.size() - 1, "Peanut");
4041
System.out.println(list);
42+
43+
sc.close();
4144
}
4245
}

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

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

3-
import java.util.*;
3+
import java.util.Arrays;
4+
import java.util.LinkedList;
45

56
/*
67
Write a method which takes in a LinkedList of Strings

0 commit comments

Comments
 (0)