@@ -57,10 +57,8 @@ public class ApplesAndOrangesWithoutGenerics {
57
57
/* Output:
58
58
___[ Error Output ]___
59
59
Exception in thread "main"
60
- java.lang.ClassCastException: Orange cannot be cast to
61
- Apple
62
- at ApplesAndOrangesWithoutGenerics.main(ApplesA
63
- ndOrangesWithoutGenerics.java:23)
60
+ java.lang.ClassCastException: Orange cannot be cast to Apple
61
+ at ApplesAndOrangesWithoutGenerics.main(ApplesAndOrangesWithoutGenerics.java:23)
64
62
*/
65
63
```
66
64
@@ -178,7 +176,7 @@ public class SimpleCollection {
178
176
}
179
177
}
180
178
/* Output:
181
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
179
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
182
180
*/
183
181
```
184
182
@@ -553,14 +551,10 @@ public class CrossCollectionIteration {
553
551
}
554
552
}
555
553
/* Output:
556
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
557
- 7:Manx
558
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
559
- 7:Manx
560
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
561
- 7:Manx
562
- 5:Cymric 2:Cymric 7:Manx 1:Manx 3:Mutt 6:Pug 4:Pug
563
- 0:Rat
554
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
555
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
556
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
557
+ 5:Cymric 2:Cymric 7:Manx 1:Manx 3:Mutt 6:Pug 4:Pug 0:Rat
564
558
*/
565
559
```
566
560
@@ -594,14 +588,10 @@ public class CrossCollectionIteration2 {
594
588
}
595
589
}
596
590
/* Output:
597
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
598
- 7:Manx
599
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
600
- 7:Manx
601
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
602
- 7:Manx
603
- 5:Cymric 2:Cymric 7:Manx 1:Manx 3:Mutt 6:Pug 4:Pug
604
- 0:Rat
591
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
592
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
593
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
594
+ 5:Cymric 2:Cymric 7:Manx 1:Manx 3:Mutt 6:Pug 4:Pug 0:Rat
605
595
*/
606
596
```
607
597
@@ -640,12 +630,10 @@ public class ListIteration {
640
630
}
641
631
}
642
632
/* Output:
643
- Rat, 1, 0; Manx, 2, 1; Cymric, 3, 2; Mutt, 4, 3; Pug,
644
- 5, 4; Cymric, 6, 5; Pug, 7, 6; Manx, 8, 7;
633
+ Rat, 1, 0; Manx, 2, 1; Cymric, 3, 2; Mutt, 4, 3; Pug, 5, 4; Cymric, 6, 5; Pug, 7, 6; Manx, 8, 7;
645
634
7 6 5 4 3 2 1 0
646
635
[Rat, Manx, Cymric, Mutt, Pug, Cymric, Pug, Manx]
647
- [Rat, Manx, Cymric, Cymric, Rat, EgyptianMau, Hamster,
648
- EgyptianMau]
636
+ [Rat, Manx, Cymric, Cymric, Rat, EgyptianMau, Hamster, EgyptianMau]
649
637
*/
650
638
```
651
639
@@ -854,8 +842,7 @@ public class SetOfInteger {
854
842
}
855
843
}
856
844
/* Output:
857
- [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
858
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]
845
+ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]
859
846
*/
860
847
```
861
848
@@ -952,8 +939,7 @@ set2 in set1: true
952
939
set1: [A, B, C, D, E, F, G, I, J, K, L, M]
953
940
set2 in set1: false
954
941
set2 removed from set1: [A, B, C, D, E, F, G, M]
955
- 'X Y Z' added to set1: [A, B, C, D, E, F, G, M, X, Y,
956
- Z]
942
+ 'X Y Z' added to set1: [A, B, C, D, E, F, G, M, X, Y, Z]
957
943
*/
958
944
```
959
945
@@ -980,13 +966,7 @@ public class UniqueWords {
980
966
}
981
967
}
982
968
/* Output:
983
- [A, B, C, Collections, D, E, F, G, H, HashSet, I, J, K,
984
- L, M, N, Output, Set, SetOperations, String, System, X,
985
- Y, Z, add, addAll, added, args, class, collections,
986
- contains, containsAll, false, from, import, in, java,
987
- main, new, out, println, public, remove, removeAll,
988
- removed, set1, set2, split, static, to, true, util,
989
- void]
969
+ [A, B, C, Collections, D, E, F, G, H, HashSet, I, J, K, L, M, N, Output, Set, SetOperations, String, System, X, Y, Z, add, addAll, added, args, class, collections, contains, containsAll, false, from, import, in, java, main, new, out, println, public, remove, removeAll, removed, set1, set2, split, static, to, true, util, void]
990
970
*/
991
971
```
992
972
@@ -1013,12 +993,7 @@ public class UniqueWordsAlphabetic {
1013
993
}
1014
994
}
1015
995
/* Output:
1016
- [A, add, addAll, added, args, B, C, class, collections,
1017
- contains, containsAll, D, E, F, false, from, G, H,
1018
- HashSet, I, import, in, J, java, K, L, M, main, N, new,
1019
- out, Output, println, public, remove, removeAll,
1020
- removed, Set, set1, set2, SetOperations, split, static,
1021
- String, System, to, true, util, void, X, Y, Z]
996
+ [A, add, addAll, added, args, B, C, class, collections, contains, containsAll, D, E, F, false, from, G, H, HashSet, I, import, in, J, java, K, L, M, main, N, new, out, Output, println, public, remove, removeAll, removed, Set, set1, set2, SetOperations, split, static, String, System, to, true, util, void, X, Y, Z]
1022
997
*/
1023
998
```
1024
999
@@ -1051,9 +1026,7 @@ public class Statistics {
1051
1026
}
1052
1027
}
1053
1028
/* Output:
1054
- {0=481, 1=502, 2=489, 3=508, 4=481, 5=503, 6=519,
1055
- 7=471, 8=468, 9=549, 10=513, 11=531, 12=521, 13=506,
1056
- 14=477, 15=497, 16=533, 17=509, 18=478, 19=464}
1029
+ {0=481, 1=502, 2=489, 3=508, 4=481, 5=503, 6=519, 7=471, 8=468, 9=549, 10=513, 11=531, 12=521, 13=506, 14=477, 15=497, 16=533, 17=509, 18=478, 19=464}
1057
1030
*/
1058
1031
```
1059
1032
@@ -1315,21 +1288,14 @@ public class InterfaceVsIterator {
1315
1288
}
1316
1289
}
1317
1290
/* Output:
1318
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
1319
- 7:Manx
1320
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
1321
- 7:Manx
1322
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
1323
- 7:Manx
1324
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
1325
- 7:Manx
1326
- {Ralph=Rat, Eric=Manx, Robin=Cymric, Lacey=Mutt,
1327
- Britney=Pug, Sam=Cymric, Spot=Pug, Fluffy=Manx}
1291
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
1292
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
1293
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
1294
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
1295
+ {Ralph=Rat, Eric=Manx, Robin=Cymric, Lacey=Mutt, Britney=Pug, Sam=Cymric, Spot=Pug, Fluffy=Manx}
1328
1296
[Ralph, Eric, Robin, Lacey, Britney, Sam, Spot, Fluffy]
1329
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
1330
- 7:Manx
1331
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
1332
- 7:Manx
1297
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
1298
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
1333
1299
*/
1334
1300
```
1335
1301
@@ -1372,10 +1338,8 @@ extends AbstractCollection<Pet> {
1372
1338
}
1373
1339
}
1374
1340
/* Output:
1375
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
1376
- 7:Manx
1377
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
1378
- 7:Manx
1341
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
1342
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
1379
1343
*/
1380
1344
```
1381
1345
@@ -1417,8 +1381,7 @@ public class NonCollectionSequence extends PetSequence {
1417
1381
}
1418
1382
}
1419
1383
/* Output:
1420
- 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug
1421
- 7:Manx
1384
+ 0:Rat 1:Manx 2:Cymric 3:Mutt 4:Pug 5:Cymric 6:Pug 7:Manx
1422
1385
*/
1423
1386
```
1424
1387
@@ -1729,64 +1692,35 @@ public class CollectionDifferences {
1729
1692
}
1730
1693
}
1731
1694
/* Output:
1732
- Collection: [add, addAll, clear, contains, containsAll,
1733
- equals, forEach, hashCode, isEmpty, iterator,
1734
- parallelStream, remove, removeAll, removeIf, retainAll,
1735
- size, spliterator, stream, toArray]
1695
+ Collection: [add, addAll, clear, contains, containsAll, equals, forEach, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray]
1736
1696
Interfaces in Collection: [Iterable]
1737
1697
Set extends Collection, adds: []
1738
1698
Interfaces in Set: [Collection]
1739
1699
HashSet extends Set, adds: []
1740
1700
Interfaces in HashSet: [Set, Cloneable, Serializable]
1741
1701
LinkedHashSet extends HashSet, adds: []
1742
- Interfaces in LinkedHashSet: [Set, Cloneable,
1743
- Serializable]
1744
- TreeSet extends Set, adds: [headSet,
1745
- descendingIterator, descendingSet, pollLast, subSet,
1746
- floor, tailSet, ceiling, last, lower, comparator,
1747
- pollFirst, first, higher]
1748
- Interfaces in TreeSet: [NavigableSet, Cloneable,
1749
- Serializable]
1750
- List extends Collection, adds: [replaceAll, get,
1751
- indexOf, subList, set, sort, lastIndexOf, listIterator]
1702
+ Interfaces in LinkedHashSet: [Set, Cloneable, Serializable]
1703
+ TreeSet extends Set, adds: [headSet, descendingIterator, descendingSet, pollLast, subSet, floor, tailSet, ceiling, last, lower, comparator, pollFirst, first, higher]
1704
+ Interfaces in TreeSet: [NavigableSet, Cloneable, Serializable]
1705
+ List extends Collection, adds: [replaceAll, get, indexOf, subList, set, sort, lastIndexOf, listIterator]
1752
1706
Interfaces in List: [Collection]
1753
- ArrayList extends List, adds: [trimToSize,
1754
- ensureCapacity]
1755
- Interfaces in ArrayList: [List, RandomAccess,
1756
- Cloneable, Serializable]
1757
- LinkedList extends List, adds: [offerFirst, poll,
1758
- getLast, offer, getFirst, removeFirst, element,
1759
- removeLastOccurrence, peekFirst, peekLast, push,
1760
- pollFirst, removeFirstOccurrence, descendingIterator,
1761
- pollLast, removeLast, pop, addLast, peek, offerLast,
1762
- addFirst]
1763
- Interfaces in LinkedList: [List, Deque, Cloneable,
1764
- Serializable]
1765
- Queue extends Collection, adds: [poll, peek, offer,
1766
- element]
1707
+ ArrayList extends List, adds: [trimToSize, ensureCapacity]
1708
+ Interfaces in ArrayList: [List, RandomAccess, Cloneable, Serializable]
1709
+ LinkedList extends List, adds: [offerFirst, poll, getLast, offer, getFirst, removeFirst, element, removeLastOccurrence, peekFirst, peekLast, push, pollFirst, removeFirstOccurrence, descendingIterator, pollLast, removeLast, pop, addLast, peek, offerLast, addFirst]
1710
+ Interfaces in LinkedList: [List, Deque, Cloneable, Serializable]
1711
+ Queue extends Collection, adds: [poll, peek, offer, element]
1767
1712
Interfaces in Queue: [Collection]
1768
1713
PriorityQueue extends Queue, adds: [comparator]
1769
1714
Interfaces in PriorityQueue: [Serializable]
1770
- Map: [clear, compute, computeIfAbsent,
1771
- computeIfPresent, containsKey, containsValue, entrySet,
1772
- equals, forEach, get, getOrDefault, hashCode, isEmpty,
1773
- keySet, merge, put, putAll, putIfAbsent, remove,
1774
- replace, replaceAll, size, values]
1715
+ Map: [clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, replace, replaceAll, size, values]
1775
1716
HashMap extends Map, adds: []
1776
1717
Interfaces in HashMap: [Map, Cloneable, Serializable]
1777
1718
LinkedHashMap extends HashMap, adds: []
1778
1719
Interfaces in LinkedHashMap: [Map]
1779
- SortedMap extends Map, adds: [lastKey, subMap,
1780
- comparator, firstKey, headMap, tailMap]
1720
+ SortedMap extends Map, adds: [lastKey, subMap, comparator, firstKey, headMap, tailMap]
1781
1721
Interfaces in SortedMap: [Map]
1782
- TreeMap extends Map, adds: [descendingKeySet,
1783
- navigableKeySet, higherEntry, higherKey, floorKey,
1784
- subMap, ceilingKey, pollLastEntry, firstKey, lowerKey,
1785
- headMap, tailMap, lowerEntry, ceilingEntry,
1786
- descendingMap, pollFirstEntry, lastKey, firstEntry,
1787
- floorEntry, comparator, lastEntry]
1788
- Interfaces in TreeMap: [NavigableMap, Cloneable,
1789
- Serializable]
1722
+ TreeMap extends Map, adds: [descendingKeySet, navigableKeySet, higherEntry, higherKey, floorKey, subMap, ceilingKey, pollLastEntry, firstKey, lowerKey, headMap, tailMap, lowerEntry, ceilingEntry, descendingMap, pollFirstEntry, lastKey, firstEntry, floorEntry, comparator, lastEntry]
1723
+ Interfaces in TreeMap: [NavigableMap, Cloneable, Serializable]
1790
1724
*/
1791
1725
```
1792
1726
0 commit comments