Here you can find the source of isMoney(String str)
public static boolean isMoney(String str)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean isMoney(String str) { for (int i = 0; i < str.length(); i++) { if (!Character.isDigit(str.charAt(i))) return false; }//from w ww .j a va2 s. c om return true; } }