Open In App

AtomicReference getPlain() method in Java with Examples

Last Updated : 27 Dec, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
The getPlain() method of a AtomicReference class is used to return the current value of AtomicReference object, with memory semantics of reading as if the variable was declared non-volatile. Syntax:
public final V getPlain()
Parameters: This method accepts nothing. Return value: This method returns the value of AtomicReference. Below programs illustrate the getPlain() method: Program 1:
Output:
Program 2:
Output:
References: https://docs.oracle.com/javase/10/docs/api/java/util/concurrent/atomic/AtomicReference.html#getPlain(V)

Next Article

Similar Reads