Write a Java program to insert a word in the middle of the another stringInsert "Tutorial" in the middle of "Python 3.0", so result will be Python Tutorial 3.0
Sample Output:
Python Tutorial 3.0
import java.lang.*; public class Exercise67 { public static void main(String[] args) { String main_string = "Python 3.0"; String word = "Tutorial"; System.out.println(main_string.substring(0, 7) + word + main_string.substring(6)); } }
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer