Operations with substrings

Report a typo

Enter the value of the variable n after executing the following code.

String str = " Inside Main";
String subs = str.substring(0, 6);
long n = subs.trim().length();
Enter a number
___

Create a free account to access the full topic