Java tutorial
import org.apache.commons.lang.StringUtils; public class MainClass { public static void main(String[] args) { //Check if string contains only a specified set of characters. Return boolean System.out.println("4) Check if 643287460 contains only 0123456789 >>>" + StringUtils.containsOnly("643287460", "0123456789")); } }