Java Long Number Create toLong(String value)

Here you can find the source of toLong(String value)

Description

to Long

License

Apache License

Declaration

public static Long toLong(String value) 

Method Source Code

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

public class Main {
    public static Long toLong(String value) {
        if (value != null && value.length() > 0) {
            try {
                return Long.valueOf(value);
            } catch (NumberFormatException e) {
                return 0L;
            }//from ww w. ja v  a2 s  .  c o  m
        }
        return 0L;
    }
}

Related

  1. toLong(String tStr)
  2. toLong(String v, long def)
  3. toLong(String val)
  4. toLong(String value)
  5. toLong(String value)
  6. toLong(String value)
  7. toLong(String value)
  8. toLong(String value, long _default)
  9. toLong(String value, long def)