class string{
	public static void main(String[] args){
		String str = new String("HelloWorld");
		System.out.println("Input: " + str);
		System.out.println("pos 3: " + str.charAt(2));
		System.out.println("length: " + str.length());

		char[] cSet = str.toCharArray();
		System.out.println("pos 5:" + cSet[4]);

		String str1 = new String("!!!");
		System.out.println("Str: " + str + "\nStr1: " +str1);
		System.out.println("After concatenation:" + (str + str1));
		System.out.println("First Occurrence of o:" + str.indexOf('o'));
		System.out.println("Last Occurrence of o:" + str.lastIndexOf('o'));
		System.out.println("First Occurrence of world:" + str.indexOf("world"));
		System.out.println("Last Occurrence of world:" + str.lastIndexOf("world"));

		System.out.println("str into uppercase:" + str.toUpperCase());
		System.out.println("str into lowercase:" + str.toLowerCase());

		System.out.println("substring from pos 4 to 6 of str:" + str.substring(4,7));
					String s1 = new String("CSI 1390");
					String s2 = new String("CSi 1390");
		System.out.println("s1: " + s1 + "\ns2: " + s2);
		System.out.println("is s1 == s2? " + s1.equals(s2));
		System.out.println("is s1 == s2? " + s1.compareTo(s2));
		System.out.println("is s1 == s1? " + s1.compareTo(s1));

	}
}











