04 Sep Markham Saturday 14:00 Java Homework 20.08.29.
Question:
Write a method to get a substring from the string. Please don’t use
the built in substring method, please write your own method for it.
public static String substring(String s, int start_index, int end_index) { String returnStr = ""; // write code here and don't use the s.substring(beginIndex, endIndex) method // to get the string. Write your own implementation for it // Start writing code from below return returnStr; }
Please check here , if you want to see how the substring method
should work
https://www.tutorialspoint.com/Java-String-substring-Method-ex
ample
Input Enter string: orange Enter starting index: 2 Enter ending index: 5 Output ange
Sorry, the comment form is closed at this time.