Level toString() method in Java with Examples Last Updated : 14 Oct, 2019 Comments Improve Suggest changes Like Article Like Report The toString() method of java.util.logging.Level is used to get the string value which represents this Level.This method returns a string representation of this Level. Syntax: public String toString() Parameters: This method accepts nothing. Return: This method returns a string representation of this Level.. Below programs illustrate toString() method: Program 1: Java // Java program to illustrate toString() method import java.util.logging.Level; import java.util.logging.Logger; public class GFG { public static void main(String[] args) { // Create a Logger Logger logger = Logger.getLogger( String.class.getName()) .getParent(); // Get level of logger Level level = logger.getLevel(); // get string value of level String val = level.toString(); // print result System.out.println("toString = " + val); } } Output: toString = INFO Program 2: Java // Java program to illustrate toString() method import java.util.logging.Level; public class GFG { public static void main(String[] args) { // Get level of logger Level level = Level.parse("SEVERE"); // get string representation String value = level.toString(); // print result System.out.println("toString = " + value); } } Output: toString = SEVERE References: https://docs.oracle.com/javase/10/docs/api/java/util/logging/Level.html#toString() Comment More infoAdvertise with us Next Article Level toString() method in Java with Examples A AmanSingh2210 Follow Improve Article Tags : Java Java-Functions Java-Level java.util.logging package Practice Tags : Java Similar Reads Locale toString() Method in Java with Examples The toString() method of Locale class in Java is used to return a string representation of this locale. Each element i.e., the language, country or the variant of the locale is separated by underbars Syntax: LOCALE.toString() Parameters: This method does not take any parameters. Return Value: This m 1 min read Matcher toString() method in Java with Examples The toString() method of Matcher Class is used to get the String representation of this matcher. This method is derived from the Object Class and behaves in the similar way. Syntax: public String toString() Parameters: This method takes no parameters. Return Value: This method returns a String value 2 min read Year toString() method in Java with Examples The toString() method of Year class in Java is used to return the string representation of this Year object. Syntax: public String toString() Parameter: This method does not accepts any parameter. Return Value: It returns the string representation of this Year object. Below programs illustrate the t 1 min read Byte toString() method in Java with examples The toString() method of Byte class is a built in method in Java which is used to return a String value. public String toString() Syntax: ByteObject.toString() Return Value: It returns a String object, the value of which is equal to the value of the ByteObject. Below is the implementation of toStrin 2 min read Bidi toString() method in Java with Examples The toString() method of java.text.Bidi class is used to display this Bidi instance in string representation. Syntax: public String toString() Parameter: This method accepts nothing as parameter. Return Value: This method display internal state of bidi in string format. Below are the examples to ill 2 min read Like