write the statement in java to extract the word "MISS" from the word "SUBMISSION"
Answers
Answered by
20
Answer:
String s: "Submission"
String st: s.substring (3,7)
Mark me the Brainliest. Hope the answer helps you.
Answered by
0
To extract the word "MISS" from "SUBMISSION" the following statement is used:
String s = "SUBMISSION":
String t = s.substring (3,7)
Substring method:
- It is a method that returns a new string which is a substring of the given string.
- It is used to extract words from the given string.
- It can also be used to extract a phrase from the given sentence.
- Write the name of the string followed by s.substring and then the index number as per the requirement.
Note: Index number starts from 0.
#SPJ2
Similar questions