Java Short Number Create toShort(String str)

Here you can find the source of toShort(String str)

Description

Converts a string to a short .

License

Open Source License

Parameter

Parameter Description
str String to convert

Return

The short value represented by the argument in decimal.

Declaration

public static short toShort(String str) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from   w  w w  .j a  v  a2  s.c  om*/
     * Converts a string to a {@code short}.
     * 
     * @param str String to convert
     * @return The {@code short} value represented by the argument in decimal.
     */
    public static short toShort(String str) {
        return Short.parseShort(str);
    }
}

Related

  1. toShort(Object value)
  2. toShort(Object value)
  3. toShort(String input, short defaultValue)
  4. toShort(String numeric)
  5. toShort(String str)
  6. toShort(String str, int maxLen)
  7. toShort(String str, short defaultValue)
  8. toShort(String value)
  9. toShort(String value)