Java Phaser getRoot() Method21 Mar 2025 | 2 min read The getRoot() Method is of Phaser Class. This method is used to get the root of the current phaser. SyntaxReturnIt returns the root of the current phaser. Example 1Output: Phasecount is 0 Thread-0 arrived Thread-1 arrived Root : java.util.concurrent.Phaser@7852e922[phase = 0 parties = 1 arrived = 0] Thread-4 arrived Thread-3 arrived Thread-2 arrived Thread-5 arrived Example 2Output: Phasecount is 0 Thread-1 arrived Root : java.util.concurrent.Phaser@7852e922[phase = 0 parties = 1 arrived = 0] Thread-0 arrived Root : java.util.concurrent.Phaser@7852e922[phase = 0 parties = 1 arrived = 0] Thread-4 arrived Thread-3 arrived Thread-5 arrived Thread-2 arrived Thread-6 arrived Phasecount is 0 Next TopicJava Phaser |
We request you to subscribe our newsletter for upcoming updates.

We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India