Java Short floatValue Example

Short class floatValue method example. This example shows you how to use floatValue method.


Short class floatValue method example. This example shows you how to use floatValue method. Method returns float value of given Short instance.

Here is the code.
/**
 * @(#) FloatValueShort.java
 * A class representing use of method floatValue() of Short class in java.lang Package.
 * @Version  03-May-2008
 @author   Rose India Team
 */
class FloatValueShort{
  public static void main(String[] args){
    short shortNum = 123;
    Short shortObj = new Short(shortNum);
    
    //Method returns float value of given Short.
    float floatValue = shortObj.floatValue()
    System.out.println("float value of given Short is : " + floatValue);
  }
}

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US