Contact: aviboots(AT)netvision.net.il
39,950 questions
51,892 answers
573 users
public class MyClass { public static void main(String args[]) { String str = "8"; try { int n = Integer.parseInt(str); System.out.println(n >= 0); } catch (NumberFormatException e) { System.out.println("Not an integer"); } } } /* run: true */