write the Java statement for extract substring from a string str from 4th position to 10th position and store it in str2
Answers
Answered by
0
Java Statement:
str2 = str.substring(4, 10);
Answered by
1
Question:-
Write the Java statement to extract the substring from a string str from 4th position to 10th position and store it in str2
Statement:-
The statement should be..
String str2=str.substring(4,10);
where, str is a string variable.
Similar questions
English,
3 months ago
Hindi,
3 months ago
English,
3 months ago
English,
7 months ago
Hindi,
7 months ago
CBSE BOARD X,
11 months ago
English,
11 months ago
Environmental Sciences,
11 months ago