Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This assignment was locked Jun 24 at 11:59pmm A. What output is produced by the

ID: 3909299 • Letter: T

Question

This assignment was locked Jun 24 at 11:59pmm A. What output is produced by the following statements? (6x2) 1. String greeting-"How do you do"; System.out.println(greeting + "Seven of Nine."); 2. String test- "abcdefg"; System.out.printin(test.length(): System.out.println(test.charAt(1)); 3. String test- "abcdefg"; System.out.println(test.substring(3); 4. System.out.println("abc ndef"); 5. System.out.println("abcIndef"); 6. String test- "Hello John",; test- test.toUpperCase); System.out.println(test); B. What is the value of the expression s1.equals(s2) after the following statements execute?(3x2) 1. String s1- "Hello John"; String s2- "hello john" 2. String s1-"Hello John"; String s2- "hello john" 3. s1- s1.toUpperCase); S2 s2.toUpperCase); C. Write Java programs :(2X7) 1. Create an array of strings. Display all the strings that start with "A" or 'a. 2. Create an array of strings. Display the contents of the array. Search for a string entered by the user. If present, display the location at which it is present, else display an appropriate message. The searching should not be case sensitive D. Explain the usage of following String methods with examples: (3X2) 1. equals0) 2. equalslgnoreCase) 3. compareto0

Explanation / Answer

B.........