TextStyle asStandalone() method in Java with Examples
The asStandalone() method of TextStyle enum is used to return the stand-alone style with the same size of this TextStyle object.
Syntax:
public TextStyle asStandalone()
Parameters: This method accepts nothing.
Return value: This method returns the stand-alone style with the same size.
Below programs illustrate the TextStyle.asStandalone() method:
Program 1:
Output:
Standalone TextStyle :SHORT_STANDALONE
Program 2:
Output:
Standalone TextStyle :FULL_STANDALONE
References: https://docs.oracle.com/javase/10/docs/api/java/time/format/TextStyle.html#asStandalone()
Last Updated :
30 Jun, 2022
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...