String类取字符

对于一个string类型数据,如果要逐一的去取其中的数据。不能够使用str[index]的方式。

而是要使用charAt()方法。

方法的定义为:

public char charAt(int index)

posted on 2012-07-18 11:12  leohxj  阅读(613)  评论(0编辑  收藏  举报

导航