/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package javapep; /** * * @author anil */ public class StringMethods { public static void main(String args[]) { // String s1="Anil kushwaha"; // String s2="Anil Kushwaha"; // System.out.println(s1.charAt(5)); // System.out.println(s1.toUpperCase()); // System.out.println(s1.toLowerCase()); // System.out.println(s1.indexOf('k')); // System.out.println(s1.equals(s2)); // System.out.println(s1.equalsIgnoreCase(s2)); // System.out.println(s1.concat(s2)); // System.out.println(s1.compareTo(s2)); // System.out.println(s1.lastIndexOf('a')); // System.out.println(s1.substring(1,6)); // System.out.println(s1.replace('k','l')); // System.out.println(s1.trim()); // char arr[]=s2.toCharArray(); // for(int i=0;i