I am preparing for OCA from a study guide. In that there is a question:
Which of the following are valid uses of sb variable?
I answered it right but it is given in answers that the following is also a correct usage:
I checked docs.oracle and they have given StringBuilder deleteCharAt(int index)
Based on the above, the deleteCharAt syntax is not correct unless a cast is provided right? How can this be correct syntax?
Which of the following are valid uses of sb variable?
I answered it right but it is given in answers that the following is also a correct usage:
I checked docs.oracle and they have given StringBuilder deleteCharAt(int index)
Based on the above, the deleteCharAt syntax is not correct unless a cast is provided right? How can this be correct syntax?