File tree Expand file tree Collapse file tree 7 files changed +7
-8
lines changed Expand file tree Collapse file tree 7 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 2
2
// (c)2017 MindView LLC: see Copyright.txt
3
3
// We make no guarantees that this code is fit for any purpose.
4
4
// Visit http://OnJava8.com for more book information.
5
- // A stack built on a linkedList
5
+ // A stack built on a LinkedList
6
6
package annotations ;
7
7
import java .util .*;
8
8
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ public class ArrayOfGenericType<T> {
8
8
@ SuppressWarnings ("unchecked" )
9
9
public ArrayOfGenericType (int size ) {
10
10
// error: generic array creation:
11
- // - array = new T[size];
11
+ //- array = new T[size];
12
12
array = (T [])new Object [size ]; // unchecked cast
13
13
}
14
14
// error: generic array creation:
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ public static void main(String[] args) {
12
12
ls = (List <String >[])la ; // Unchecked cast
13
13
ls [0 ] = new ArrayList <>();
14
14
15
- // - ls[1] = new ArrayList<Integer>();
15
+ //- ls[1] = new ArrayList<Integer>();
16
16
// error: incompatible types: ArrayList<Integer>
17
17
// cannot be converted to List<String>
18
18
// ls[1] = new ArrayList<Integer>();
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public static void basicTest(List<String> a) {
32
32
b = a .isEmpty (); // Any elements inside?
33
33
it = a .iterator (); // Ordinary Iterator
34
34
lit = a .listIterator (); // ListIterator
35
- lit = a .listIterator (3 ); // Start at loc 3
35
+ lit = a .listIterator (3 ); // Start at location 3
36
36
i = a .lastIndexOf ("1" ); // Last match
37
37
a .remove (1 ); // Remove location 1
38
38
a .remove ("3" ); // Remove this object
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ static double[] primitive(Double[] in) {
57
57
static Boolean [] boxed (boolean [] in ) {
58
58
Boolean [] result = new Boolean [in .length ];
59
59
for (int i = 0 ; i < in .length ; i ++)
60
- result [i ] = in [i ]; // Autboxing
60
+ result [i ] = in [i ]; // Autoboxing
61
61
return result ;
62
62
}
63
63
static Character [] boxed (char [] in ) {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public static String thisClass(byte[] classBytes) {
53
53
case 11 : // INTERFACE_METHOD_REF
54
54
case 12 : // NAME_AND_TYPE
55
55
case 18 : // Invoke Dynamic
56
- data .readInt (); // discard 4 bytes;
56
+ data .readInt (); // discard 4 bytes
57
57
break ;
58
58
case 15 : // Method Handle
59
59
data .readByte ();
@@ -86,7 +86,6 @@ public static String thisClass(byte[] classBytes) {
86
86
// Walk the entire tree:
87
87
Files .walk (Paths .get ("." ))
88
88
.filter (matcher ::matches )
89
- //.peek(System.out::println)
90
89
.map (p -> {
91
90
try {
92
91
return thisClass (Files .readAllBytes (p ));
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class CircularQueueTest {
11
11
private int i = 0 ;
12
12
@ BeforeEach
13
13
public void initialize () {
14
- while (i < 5 ) // Preload with some data
14
+ while (i < 5 ) // Pre-load with some data
15
15
queue .put (Integer .toString (i ++));
16
16
}
17
17
// Support methods:
You can’t perform that action at this time.
0 commit comments