The Java Iterator interface represents a component that can iterate the elements of a Java collection. You can obtain a Java Iterator from a Java List, Java Set, Java Map, or other collection types. You can also implement the Java Iterator interface yourself, to create your own custom Iterator.
Chapters 0:00 Java Iterator introduction 1:30 Iterate elements via a Java Iterator 2:50 Iteration order 4:27 Java Iterator with generic type 5:56 Modifying a collection during iteration 10:44 Remove elements during iteration 12:37 ListIterator 14:44 Implement the Iterator interface in your own class 17:17 Iterator forEachRemaining() method
Thread congestion can occur when two or more threads are trying to access the same, guarded data structure at the same time. By "guarded" I mean that the data structure is guarded using synchronized blocks or a concurrent data structure (Lock, BlockingQueue etc.) so that the data structure is thread safe. The resulting thread congestion means that the threads trying to access the shared data structure are spending a high amount of time waiting in line to access the data structure - wasting valuable execution time on waiting.
Chapters:
0:00 Thread congestion introduction
1:40 Thread congestion wastes thread execution time
2:22 Thread congestion alleviation solutions
3:05 Work stealing improvement
3:58 Thread congestion code examples
Thread Congestion in Java - Tutorial - Text:
http://tutorials.jenkov.com/java-concurrency/thread-congestion.html
Java Concurrency Tutorial - Text:
http://tutorials.jenkov.com/java-concurrency/index.html
Java Concurrency Video Playlist:
https://www.youtube.com/playlist?list=PLL8woMHwr36EDxjUoCzboZjedsnhLP1j4
Java Thread Visibility is covered in:
https://www.youtube.com/watch?v=LCSqZyjBwWA&list=PLL8woMHwr36EDxjUoCzboZjedsnhLP1j4&index=4
https://www.youtube.com/watch?v=oY14UyP61F8&list=PLL8woMHwr36EDxjUoCzboZjedsnhLP1j4&index=6
https://www.youtube.com/watch?v=eKWjfZ-TUdo&list=PLL8woMHwr36EDxjUoCzboZjedsnhLP1j4&index=6
https://www.youtube.com/watch?v=nhYIEqt-jvY&list=PLL8woMHwr36EDxjUoCzboZjedsnhLP1j4&index=6
https://www.youtube.com/watch?v=nNXkzDS6dOg&list=PLL8woMHwr36EDxjUoCzboZjedsnhLP1j4&index=9
...
https://www.youtube.com/watch?v=DqpPRxCmxrM
http://tutorials.jenkov.com/svg/polygon-element.html The SVG polygon element can draw polygons by specifying a list of points between which the edges of the polygons are to be drawn.
...
https://www.youtube.com/watch?v=OLUMeqSXPZY
A Java enum is a mechanism for creating a collection of constants in Java. A Java enum is short for an "enumeration of constants". Typically you will create an enum containing related constants, e.g. HIGH, MEDIUM and LOW. This video explains how Java enums works.
If you prefer a textual Java enum tutorial, I have one here:
http://tutorials.jenkov.com/java/enums.html
...
https://www.youtube.com/watch?v=1612Ngij7_c
http://tutorials.jenkov.com/dependency-injection/index.html This video explains dependency injection in 5 minutes. While dependency injection may not be the silver bullet that solves all problems, dependency injection is still a nice tool in any developers tool belt. Check out the corresponding 10 texts in my dependency injection tutorial too, by clicking the link first in the description.
...
https://www.youtube.com/watch?v=Hm2fTv9wikI
http://tutorials.jenkov.com/svg/rect-element.html Click the link too see the companion SVG rect tutorial. The rect element draws rectangles inside SVG images. The rect element can draw rounded corners, dashed stroke, transparent fill and more.
...
https://www.youtube.com/watch?v=CSPVW1YOrcY
Java switch expressions were added to Java in Java 12. Java switch expressions enable a switch instruction to return a value, or to be evaluated to a value, in other words. This Java switch expression tutorial explains how the new switch expressions work.
Here is a link to a textual version of this tutorial:
http://tutorials.jenkov.com/java/switch.html
Here is a link to the first video in this Java switch tutorial series:
https://www.youtube.com/watch?v=P9pZEZsLHmM
...
https://www.youtube.com/watch?v=-vsd3IAD81U
The Java Happens Before Guarantee is a set of rules that restrict instruction reordering to make sure that instruction reordering does not break the Java visibility guarantees. Breaking the visibility guarantees (of data shared between threads) would make thread communication in Java much less reliable, and thus harder to get right. The Java Happens Before Guarantee counters that.
Chapters:
0:00 Java Happens Before Guarantee - Introduction
0:34 Instruction reordering explained
3:42 Instruction reordering may affect visibility of changes to objects shared between threads
7:04 The visibility guarantee of volatile variables
11:18 Instruction reordering may break the volatile visibility guarantee
14:10 Volatile happens before guarantee
17:08 Synchronized visibility guarantee
20:09 Instruction reorderingmay break the synchronized visibility guarantee
22:45 Synchronized happens before guarantee
25:06 Further notes
Java Memory Model - JSR 133
https://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html
Here is a textual version of this Java Happens Before Guarantee tutorial:
http://tutorials.jenkov.com/java-concurrency/java-happens-before-guarantee.html
The Java Happens Before Guarantee is part of the Java Memory Model. I have an introduction to the Java Memory Model (link below) which content I assume you are reasonably familiar with (thread stacks and the heap) before watching this video.
https://www.youtube.com/watch?v=LCSqZyjBwWA
Java Concurrency video playlist:
https://www.youtube.com/playlist?list=PLL8woMHwr36EDxjUoCzboZjedsnhLP1j4
Java Concurrency textual tutorials:
http://tutorials.jenkov.com/java-concurrency/index.html
...
https://www.youtube.com/watch?v=oY14UyP61F8
The Java ThreadLocal class is capable of keeping a single value internally per thread that accesses it. That means, that if multiple threads share a Java ThreadLocal, each of them can set their own value inside the ThreadLocal without overwriting each other's values. When getting the value again, each thread will get the latest value it has set on the ThreadLocal - and not any value set by other threads.
Chapters
0:00 Java ThreadLocal introduction incl. set() and get()
3:18 Java ThreadLocal remove() method
5:20 Java ThreadLocal with initial value
8:33 Set value lazily on Java ThreadLocal
10:21 Using a Java ThreadLocal from within an thread pool
11:39 Java InheritableThreadLocal
Java ThreadLocal - text:
http://tutorials.jenkov.com/java-concurrency/threadlocal.html
Java Concurrency - text / video
http://tutorials.jenkov.com/java-concurrency/index.html
https://www.youtube.com/playlist?list=PLL8woMHwr36EDxjUoCzboZjedsnhLP1j4
...
https://www.youtube.com/watch?v=a_BoqsnVR2U