The correct answer is the letter C, String is immutable, that is, it is necessary to create a new variable, in the line "myStr.trim();" as no variables are assigned, the line is almost forgotten because it compiles. As java indexes from 0 it prints 5 which is the C answer.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
iSnover
Highly Voted 1 year agoVicky_65
Most Recent 6 months agoakbiyik
10 months, 1 week agoalex_au
1 year agoshivkumarx
1 year agoshivkumarx
1 year agoiSnover
1 year ago