Loading...
Write the output for the following: String s1 = "Life is Beautiful"; System.out.println ("Earth" + s1.substring(4)); System.out.println( s1.endsWith("L") );
The String class method to join two strings is:
The output of the function "COMPOSITION".substring(3, 6):
Give the output of the following program segment and specify how many times the loop is executed. String s = “JAVA”; for(i=0;i<s.length();i+=2) System.out.println(s.substring(i));
To extract the word NOW from the word “ACKNOWLEDGEMENT”, the Java statement “ACKNOWLEDGEMENT”.substring(3, _____) is used. Choose the correct number to fill in the blank.
Assertion (A): The substring() method modifies the original String. Reason (R): The substring() method can extract part of a String starting from a specific index.
© 2026 PadhAiPro. This question is provided for educational purposes.