Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

charAt - Returns the character from the string in Java

String: To store the Contents to use in the program.
length(): To find the total charcter in the given string.
chatAt(): Returns the Index Character from the String
  1. Syntax:
  2. AccessModifier char VariableName =StringVariable.charAt(int);
  3. Example:
  4. public String a="forgercode";
  5. int b=a.charAt(1);

  1. import java.lang.*;
  2. class ForgetCode
  3. {
  4. public static void main(String args[])
  5. {
  6. String forget="www.forgetcode.com";
  7. System.out.println("A Syntax warehouse site:"+forget);
  8. int a=forget.length();
  9. System.out.println("Length of the string:"+a);
  10. char f=forget.chatAt(5);
  11. chat c=forget.chatAt(11);
  12. System.out.println("Symbol of ForgetCode:"+f+c);
  13.  
  14. }
  15. }
  16.