knu project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
445 B

package kr.co.kihyun.lang;
public class MLong {
public static Long parseLong(String s) {
return parseLong(s, null);
}
public static Long parseLong(String s, Long earlyValue) {
try {
if (s != null) {
return Long.parseLong(s);
} else {
return earlyValue;
}
} catch (NumberFormatException ex) {
return earlyValue;
}
}
public static String toString(int num) {
return (num > 9) ? ("" + num) : ("0" + num);
}
}