What is the output of the following string s="Goa"; string S1=s.trim();
System.out.println+s1.length());
Answers
Answered by
0
Answer:
System.out.println+s1.length()); gives error brackets are not placed correctly
System.out.println(s1.length()); gives 3 as answer
Because trim eliminates spaces before G and after a.
As there are no spaces it would return the size of the string.
Similar questions
Social Sciences,
3 months ago
English,
3 months ago
Computer Science,
3 months ago
English,
6 months ago
English,
6 months ago
Math,
10 months ago