⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stringutil.java

📁 分为经理和出纳2个权限
💻 JAVA
字号:
package com.yiboit.cfss.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class StringUtil {
	private static SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
	
	public static boolean isDate(String date) {
		try {
			sdf.parse(date);
		} catch (ParseException e) {
			return false;
		}
		
		return true;
	}
	
	public static boolean isDouble(String num) {
		try {
			Double.parseDouble(num);
			return true;
		} catch (NumberFormatException e) {
			return false;
		}
	}
	
	public static boolean isInteger(String num) {
		try {
			Integer.parseInt(num);
			return true;
		} catch (NumberFormatException e) {
			return false;
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -