Skip to main content

Unit 1 · Using Objects and Methods

String Indexing

String Indexing MCQ Practice

Question 1 of 15

Answered 0 of 15

Choose one answer.

What is printed by the following code segment?

String s = "signal";
System.out.print(s.length() + " " + s.substring(0, 1));
Choose one answer.