Advertisements
Advertisements
Question
Write the output of the codes given below.
String ra ="Failure is not failing.";String rb ="Failure is, giving up.";
int p1 = ra.indexOf(′ b'); // b indicates one space
String ca = ra.substring(0, p1); boolean v = rb.startsWith(ca);
System.out.println(" ca = "+ ca); System.out.println(" V =" +v);Very Short Answer
Advertisements
Solution
ca = Failure
V = true
shaalaa.com
Is there an error in this question or solution?
