Java String Value Of valueOf(String decimal)

Here you can find the source of valueOf(String decimal)

Description

value Of

License

Apache License

Declaration

public static int valueOf(String decimal) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static int valueOf(String decimal) {
        int index = decimal.indexOf(".");
        if (index > 0) {
            decimal = decimal.substring(0, index);
        }/*  ww  w.  j a v a2  s.co m*/
        return Integer.valueOf(decimal);
    }
}

Related

  1. valueOf(final Class clazz, final String name)
  2. valueOf(final Class enumType, final String name)
  3. valueOf(final Object obj, final String defaultValue)
  4. valueOf(Object object, String defaultEmptyValue)
  5. valueOf(String boolStr)
  6. valueOf(String first, String defaultstr)
  7. valueOf(String format, String value)
  8. valueOf(String s)
  9. valueOf(String s)