正在加载图片...
Accessing Individual Elements r Individual characters in a String accessed with the charAt method String name Sumatra i 0 2 345 6 a a name name charAt(3 This variable refers to the The method returns the whole string character at position #3 C 2000 McGraw-Hill troduction to Object-Oriented Programming with Java--Wu Chapter 8-8© 2000 McGraw-Hill Introduction to Object-Oriented Programming with Java--Wu Chapter 8 - 8 Accessing Individual Elements Individual characters in a String accessed with the charAt method. 0 1 2 3 4 5 6 S u m a t r a String name = “Sumatra”; name This variable refers to the whole string. name.charAt( 3 ) The method returns the character at position # 3
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有