File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,15 +37,17 @@ public static void main(String[] args) {
3737 for (int i = 0 ; i < size ; i ++) {
3838 sa .add (new SoftReference <>(
3939 new VeryBig ("Soft " + i ), rq ));
40- System .out .println ("Just created: " + sa .getLast ());
40+ System .out .println (
41+ "Just created: " + sa .getLast ());
4142 checkQueue ();
4243 }
4344 LinkedList <WeakReference <VeryBig >> wa =
4445 new LinkedList <>();
4546 for (int i = 0 ; i < size ; i ++) {
4647 wa .add (new WeakReference <>(
4748 new VeryBig ("Weak " + i ), rq ));
48- System .out .println ("Just created: " + wa .getLast ());
49+ System .out .println (
50+ "Just created: " + wa .getLast ());
4951 checkQueue ();
5052 }
5153 SoftReference <VeryBig > s =
@@ -58,7 +60,8 @@ public static void main(String[] args) {
5860 for (int i = 0 ; i < size ; i ++) {
5961 pa .add (new PhantomReference <>(
6062 new VeryBig ("Phantom " + i ), rq ));
61- System .out .println ("Just created: " + pa .getLast ());
63+ System .out .println (
64+ "Just created: " + pa .getLast ());
6265 checkQueue ();
6366 }
6467 }
Original file line number Diff line number Diff line change 33// We make no guarantees that this code is fit for any purpose.
44// Visit http://OnJava8.com for more book information.
55// Performance differences between Deques
6- package understandingcollections .jmh ;
6+ package collectiontopics .jmh ;
77import org .openjdk .jmh .annotations .*;
88import java .util .concurrent .TimeUnit ;
99import java .util .*;
Original file line number Diff line number Diff line change 33// We make no guarantees that this code is fit for any purpose.
44// Visit http://OnJava8.com for more book information.
55// Performance differences between Lists
6- package understandingcollections .jmh ;
6+ package collectiontopics .jmh ;
77import org .openjdk .jmh .annotations .*;
88import java .util .*;
99import java .util .concurrent .*;
Original file line number Diff line number Diff line change 33// We make no guarantees that this code is fit for any purpose.
44// Visit http://OnJava8.com for more book information.
55// Performance differences between Maps
6- package understandingcollections .jmh ;
6+ package collectiontopics .jmh ;
77import org .openjdk .jmh .annotations .*;
88import org .openjdk .jmh .infra .Blackhole ;
99import java .util .*;
Original file line number Diff line number Diff line change 33// We make no guarantees that this code is fit for any purpose.
44// Visit http://OnJava8.com for more book information.
55// Performance differences between Queues
6- package understandingcollections .jmh ;
6+ package collectiontopics .jmh ;
77import org .openjdk .jmh .annotations .*;
88import java .util .*;
99import java .util .concurrent .*;
Original file line number Diff line number Diff line change 33// We make no guarantees that this code is fit for any purpose.
44// Visit http://OnJava8.com for more book information.
55// Demonstrates performance differences in Sets
6- package understandingcollections .jmh ;
6+ package collectiontopics .jmh ;
77import org .openjdk .jmh .annotations .*;
88import org .openjdk .jmh .infra .Blackhole ;
99import java .util .*;
You can’t perform that action at this time.
0 commit comments