Checking strings as valid integers
<p>i wan to split a string and then check if every part that i splitted is a number or an identifier this is what i did so far :)</p>

<pre><code>public class splitest {


public void splitfunc() {


    String str = "A:25";
    String[] temp = null;
    temp = str.split(":");

    run(temp);
}

public void run(String[] s) {


    for (int i = 0; i &lt; s.length; i++) {

        if (s[i].equals(" ")) {   // &lt;&lt;&lt;   checks if the splitted string is a digit ot not??

            System.out.println(s[i]+"  is a number");

            } else

                System.out.println(s[i]+"  is an Identfier");
    }
}

public static void main(String args[]) throws Exception {
    splitest ss = new splitest();
    ss.splitfunc();
}
  }
</code></pre>

<p>is there a way to convert the string into a digit then check or something?</p>

<p>the output should be like this:
this is an identifier
this is a number</p>
