Click here to watch in Youtube :
https://www.youtube.com/watch?v=a8MEH8joA4w&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
/* * public char charAt(int index) * * Parameters: * ---------- * index - the index of the char value. * * Returns: * -------- * The char value at the specified index of * this string. The first char value is at index 0. */ public class CharAtDemo { public static void main(String[] args) { String str = "Welcome"; char ch = str.charAt(3); System.out.println("charAt(3) = " + ch); ch = str.charAt(5); System.out.println("charAt(5) = " + ch); } }
charAt(3) = c charAt(5) = m
https://sites.google.com/site/javaee4321/java/StringDemo_charAt_Get_char_App.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/StringDemo_charAt_Get_char_App
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/764ecf5c6cba932aee2ceef22ba699fc15012e37/BasicJava/StringDemo_charAt_Get_char_App/?at=master
See also:
No comments:
Post a Comment