CharAt Program in java

  1. import java.io.*;  
  2. class CharAt{  
  3.     public static void main(String[] args){  
  4.         try{  
  5.         BufferedReader object=new BufferedReader(new InputStreamReader(System.in));  
  6.         System.out.println("Enter the String");  
  7.         String s=object.readLine();  
  8.         int len=s.length();  
  9.         System.out.println(len);  
  10.         char char1=s.charAt(4);  
  11.         System.out.println(char1);  
  12.         }  
  13.         catch(Exception e){}  
  14.     }