Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bf96ac6

Browse files
committed
Comment spell corrections
1 parent 0c6fc30 commit bf96ac6

File tree

7 files changed

+7
-8
lines changed

7 files changed

+7
-8
lines changed

annotations/StackL.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// (c)2017 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
5-
// A stack built on a linkedList
5+
// A stack built on a LinkedList
66
package annotations;
77
import java.util.*;
88

arrays/ArrayOfGenericType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class ArrayOfGenericType<T> {
88
@SuppressWarnings("unchecked")
99
public ArrayOfGenericType(int size) {
1010
// error: generic array creation:
11-
// - array = new T[size];
11+
//- array = new T[size];
1212
array = (T[])new Object[size]; // unchecked cast
1313
}
1414
// error: generic array creation:

arrays/ArrayOfGenerics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static void main(String[] args) {
1212
ls = (List<String>[])la; // Unchecked cast
1313
ls[0] = new ArrayList<>();
1414

15-
// -ls[1] = new ArrayList<Integer>();
15+
//- ls[1] = new ArrayList<Integer>();
1616
// error: incompatible types: ArrayList<Integer>
1717
// cannot be converted to List<String>
1818
// ls[1] = new ArrayList<Integer>();

collectiontopics/ListOps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static void basicTest(List<String> a) {
3232
b = a.isEmpty(); // Any elements inside?
3333
it = a.iterator(); // Ordinary Iterator
3434
lit = a.listIterator(); // ListIterator
35-
lit = a.listIterator(3); // Start at loc 3
35+
lit = a.listIterator(3); // Start at location 3
3636
i = a.lastIndexOf("1"); // Last match
3737
a.remove(1); // Remove location 1
3838
a.remove("3"); // Remove this object

onjava/ConvertTo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static double[] primitive(Double[] in) {
5757
static Boolean[] boxed(boolean[] in) {
5858
Boolean[] result = new Boolean[in.length];
5959
for(int i = 0; i < in.length; i++)
60-
result[i] = in[i]; // Autboxing
60+
result[i] = in[i]; // Autoboxing
6161
return result;
6262
}
6363
static Character[] boxed(char[] in) {

onjava/atunit/ClassNameFinder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static String thisClass(byte[] classBytes) {
5353
case 11: // INTERFACE_METHOD_REF
5454
case 12: // NAME_AND_TYPE
5555
case 18: // Invoke Dynamic
56-
data.readInt(); // discard 4 bytes;
56+
data.readInt(); // discard 4 bytes
5757
break;
5858
case 15: // Method Handle
5959
data.readByte();
@@ -86,7 +86,6 @@ public static String thisClass(byte[] classBytes) {
8686
// Walk the entire tree:
8787
Files.walk(Paths.get("."))
8888
.filter(matcher::matches)
89-
//.peek(System.out::println)
9089
.map(p -> {
9190
try {
9291
return thisClass(Files.readAllBytes(p));

validating/tests/CircularQueueTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class CircularQueueTest {
1111
private int i = 0;
1212
@BeforeEach
1313
public void initialize() {
14-
while(i < 5) // Preload with some data
14+
while(i < 5) // Pre-load with some data
1515
queue.put(Integer.toString(i++));
1616
}
1717
// Support methods:

0 commit comments

Comments
 (0)