Answered step by step
Verified Expert Solution
Question
1 Approved Answer
First line: Second line: Third line: Fourth line: Fifth line: public class FirstProgram public static void main(Stringl args) t String s1- Java Programming Rocks!; String
First line:
Second line:
Third line:
Fourth line:
Fifth line:
public class FirstProgram public static void main(Stringl args) t String s1- "Java Programming Rocks!"; String s2-".@#$%8"; String s3"0123456789"; //First line of output int size s3.length0 s2.length0 + 4; System.out.println (size) //Second line of output System.out.println(s3.charAt(7); //Third line of output int iSum s1.indexOf(P) + s3.indexOf(5) System.out.printin(iSum); //Fourth line of output String sSubstr s1.substring(2.4) + s3.substring(0,5); System.out.println(s Substr); //Fifth line of output boolean bEquals s3.substring(2,6).equals("2345"); System.out.println(bEquals)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started