battle programminga forum for elite programmerswith extreme will powerto sharpen theire skills
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Share | 

 java class that filter numbers out of a string

Go down 
Moti Barski

Moti Barski

Posts : 286
Join date : 2011-08-02

PostSubject: java class that filter numbers out of a string   Mon Jul 30, 2018 11:20 am

public class Numerize {
    final static private String allnums = "0123456789";
    public  static  String filter(String s1){
        char[] arr = s1.toCharArray();
        String result="";
        for (char ot:arr) {
            if(allnums.contains(ot + "")){result+= ot;}
        return result;


MB over and out _______________________     
Back to top Go down
View user profile
java class that filter numbers out of a string
Back to top 
Page 1 of 1
 Similar topics
» Cannot locate the class Select in web driver
» Exception in thread "main" Selenium is already running on port 4444. Or some other service is.
» How to compare images selenium, using java
» Trojan Problem
» Eclipse setup with selenium RC

Permissions in this forum:You cannot reply to topics in this forum
battle programmers alliance :: battle programming alliance :: battle programming-
Jump to: