+ 1
indexOf() in java
Why in the syntax "int indexOf(int ch)" the type of ch is "int". It should be rather "char" because here we are searching for character and not an integer.
3 Answers
+ 1
I think for handling Unicode chars
+ 1
then why in the syntax "int indexOf(String str)" type of str is String and not integer
- 1
Becauae you want get index of a substring đ