Also, it appears that you have an extra bracket after your Numbers constructor.
Anyway, Numbers isn't passed an int as a param anyway.
Type: Posts; User: javapenguin
Also, it appears that you have an extra bracket after your Numbers constructor.
Anyway, Numbers isn't passed an int as a param anyway.
System.out.println(countDigits(s));
There's no method called countDigits(s) in that class with the main method.
Try this
Number n = new Number();
System.out.println(n.countDigits(s));