Level intValue() method in Java with Examples Last Updated : 14 Oct, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The intValue() method of java.util.logging.Level is used to get the integer value for this level object. Every level has an integer value associated with it. This integer value can be used for efficient ordering comparisons between Level objects. This method is helpful if we want to use the int value of a level object for comparison purposes in logging. Syntax: public int intValue() Parameters: This method accepts nothing. Return: This method returns the integer value for this level object. Below programs illustrate intValue() method: Program 1: Java // Java program to illustrate // intValue() 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 intValue int val = level.intValue(); // print result System.out.println("intValue = " + val); } } Output: intValue = 800 Program 2: Java // Java program to illustrate // intValue() 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 int code int value = level.intValue(); // print result System.out.println("intValue = " + value); } } Output: intValue = 1000 References: https://docs.oracle.com/javase/10/docs/api/java/util/logging/Level.html#intValue() Comment More infoAdvertise with us Next Article Byte intValue() 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 Byte intValue() method in Java with examples The intValue() method of Byte class is a built in method in Java which is used to return the value of this Byte object as int. Syntax ByteObject.intValue() Return Value: It returns the value of ByteObject as int. Below is the implementation of intValue() method in Java: Example 1: Java // Java code 2 min read Byte intValue() method in Java with examples The intValue() method of Byte class is a built in method in Java which is used to return the value of this Byte object as int. Syntax ByteObject.intValue() Return Value: It returns the value of ByteObject as int. Below is the implementation of intValue() method in Java: Example 1: Java // Java code 2 min read Float intValue() method in Java with examples The intValue() method in Float Class is a built in method in Java that returns the value specified by the calling object as int after type casting. Syntax: public int intValue() Parameters: The function accepts no parameter. Return Value: It return the value of FloatObject as int. Below programs ill 2 min read Float intValue() method in Java with examples The intValue() method in Float Class is a built in method in Java that returns the value specified by the calling object as int after type casting. Syntax: public int intValue() Parameters: The function accepts no parameter. Return Value: It return the value of FloatObject as int. Below programs ill 2 min read Double intValue() method in Java with examples The intValue() method of Double class is a built in method to return the value specified by the calling object as int after type casting. Syntax: DoubleObject.intValue() Return Value: It return the value of DoubleObject as int. Below programs illustrate intValue() method in Java: Program 1: Java // 2 min read Double intValue() method in Java with examples The intValue() method of Double class is a built in method to return the value specified by the calling object as int after type casting. Syntax: DoubleObject.intValue() Return Value: It return the value of DoubleObject as int. Below programs illustrate intValue() method in Java: Program 1: Java // 2 min read Like