Short floatValue() method in Java with Example Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The java.lang.Short.floatValue() method of Short class is a built in method in Java which is used to return the value of the Short object as a float. Syntax: public float floatValue() Return type: It return the value of ShortObject as float. Below is the implementation of floatValue() method in Java: Example 1: Java // Java code to demonstrate // Short floatValue() method class GFG { public static void main(String[] args) { // Short value Short a = 17; // wrapping the Short value // in the wrapper class Short Short b = new Short(a); // floatValue of the Short Object float output = b.floatValue(); // printing the output System.out.println("Float value of " + a + " is : " + output); } } Output: Float value of 17 is : 17.0 Example 2: Java // Java code to demonstrate // Short floatValue() method class GFG { public static void main(String[] args) { String value = "17"; // wrapping the Short value // in the wrapper class Short Short b = new Short(value); // floatValue of the Short Object float output = b.floatValue(); // printing the output System.out.println("Float value of " + b + " is : " + output); } } Output: Float value of 17 is : 17.0 Comment More infoAdvertise with us Next Article Number.floatValue() method in java with examples S Sruti Rai Follow Improve Article Tags : Misc Java java-basics Java-lang package Java-Functions Java-Short +2 More Practice Tags : JavaMisc Similar Reads Number.floatValue() method in java with examples The floatValue() method is an inbuilt method in Java from the java.lang.Number class. This method is used when we want to extract the value of a Number object as a float data type. This may involve rounding or truncation, because this method returns the numeric value of the current object converted 2 min read Float shortValue() method in Java with examples The shortValue() method in Float Class is a built-in method in Java which returns the value specified by calling the object as short after typecasting.Syntax: public short shortValue() Return Value: It return the value of FloatObject as short.Below programs illustrate shortValue() method in Java: Pr 2 min read Byte floatValue() method in Java with examples The floatValue() method of Byte class is a built in method in Java which is used to return the value of this Byte object as float. Syntax ByteObject.floatValue() Return Value: It return the value of ByteObject as float. Below is the implementation of floatValue() method in Java: Example 1: Java // J 2 min read Float parseFloat() method in Java with examples The parseFloat() method in Float Class is a built in method in Java that returns a new float initialized to the value represented by the specified String, as done by the valueOf method of class Float. Syntax: public static float parseFloat(String s) Parameters: It accepts a single mandatory paramete 2 min read Short hashCode() method in Java with Examples The hashCode() method of Short class is a built in method in Java which is used to return the hash code of the ShortObject. Note: The hashCode() returns the same value as intValue(). Syntax ShortObject.hashCode() Return Value: It return an int value which represents the hashcode of the specified Sho 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 Like