st= "8.374"
Find char P=
st.char At(1)
Answers
Answered by
2
- P = '.'
- Method charAt(x) extracts the character present in the string at index x.
- Here, the character at second index is a dot. So, p = '.'
- Note that index value starts with 0. So, the character at index 1 is the second character of the string which is a dot.
Similar questions