Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please explain how you got the output 10. What is the output of the following program? public class Problem2{ public static void main(String [] args)
Please explain how you got the output
10. What is the output of the following program? public class Problem2\{ public static void main(String [] args) \{ String str1 = "Hello"; String str2 = "York students"; s1 = nosense (s1,s2); println 1(s1+"+s2); \} private string nosense(String s1, String s2) \{ String result = s 2. substring (s2. length ()5); s2 = " + s 2 . charAt (s1. length ()); s1 1 s 1 substring(2); result +=s2+ s 1; return result; \}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