public class CharAtExample
{
public static void main(String args[])
{
String name="GULZAR";
char ch=name.charAt(4);//returns the char value at the 4th index
System.out.println(ch);
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.