int uniqueNo = new Double( Math.random() * 100000000 ).intValue();
Pattern nPat = Pattern.compile("[0-9]{0,8}");
Matcher nM = nPat.matcher(uniqueNo);
boolean nCheck = nM.matches();
but it gives me an error says that
error: method matcher in class pattern cannot be applied to the given types;

New Topic/Question
Reply



MultiQuote



|