Java Short decode Example

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


Short class decode method example. This example shows you how to use decode method. This is static method and returns decoded value of a String into a Short.

Here is the code.
/**
 * @(#)  DecodeShort.java
 * A class representing use of method decode() of Short class in java.lang Package.
 * @Version  03-May-2008
 @author   Rose India Team
 */
class DecodeShort{
  public static void main(String[] args){
    String str = "123";
    
    //This is static method.
    //Method returns decoded value of a String into a Short.
    Short shortValue = Short.decode(str)
    System.out.println("Decoded value of a String into a Short is : " + shortValue);
  }
}

null

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

HOME | COPYRIGHT | CONTACT US