how to count the number of charecter in a string without using any inbuilt function in java?
check for null charecter in a string
Collapse
X
-
using the charAt and length function can do the program, i want to know can we use array index value for string operation?Comment
-
i want to know can we use array index value for string operation?
It might have been easier just to ask that question.
Why do you not want to use "built in" methods? They are built in so that you can use them. Not using builtin methods leaves you with just using arithmetic and other operators and assigning the results to things but that's about it: a sort of leaf-falling-from-a-tree-in-a-forest-unobserved situation.
As regards the "null" character (do you mean zero?): this has nothing to do with the number of characters in a string in Java. That is, strings are not terminated in any special way.Comment
Comment