package com.yawintutor; public class StringSubstringCharAt { public static void main(String[] args) { String str = "Bangalore"; String str2; str2 = str.substring(3, 8); System.out.println("Given String : " + str); System.out.println("Output String : " + str2); } }