I want to count the number of ones in the string...which should be 6 according to this example...but the length() functino doesnt seem to be returning the right value...helpp!!
posted 11 years ago
What value seems to be returned by b.length()? How is it that you are using/displaying this value? When I run your code, with a System.out.println(len); immediately after it, I get 6, as expected. [ April 09, 2004: Message edited by: Dirk Schreckmann ]