Computer Science, asked by sanjivani11, 7 months ago

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 Oreki
0

Java Statement:

str2 = str.substring(4, 10);

Answered by anindyaadhikari13
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