intelligent people only . I will mark you brainliest
What is the output? [3]
String s=”Strength”,t=”will”;
System.out.println(s.startsWith(“tr”));
System.out.println(t.indexOf(„l‟));
System.out.println(s.substring(4).concat(t.substring(1,3)));
Share
[tex]\textsf{\large \textbf{Given Snippet}}[/tex]
[tex]\texttt{String s = "Strength", t = "will";}\\\texttt{System.out.println(s.startsWith("tr"));}\\\texttt{System.out.println(t.indexOf("l"));}\\\texttt{System.out.println(s.substring(4).concat(t.substring(1,3)));}[/tex]
[tex]\textsf{\large \textbf{After Execution}}[/tex]
[tex]\texttt{s.startsWith("tr") ->} \text{ \textbf{false}}\\\texttt{t.indexOf("l") ->} \text{ \textbf{2}, As `l' first occurs at index 2.}\\\\\texttt{s.substring(4).concat(t.substring(1,3))}\\\texttt{"ngth".concat("il")}\\\texttt{-> "ngthil"}[/tex]
[tex]\textsf{\textit{Out\symbol{112}ut: }} \texttt{false}\\\texttt{\hspace{3em} 2}\\\texttt{\hspace{3em} ngthil}[/tex]