摘要:
##java_基本API的总结#####类 String方法:###1.**substring(int beginIndex, int endIndex) :**返回一个新的字符串,它是此字符串的一个子字符串。用法:-**String sex = id[i].substring(16, 17);** //16位开始,17位结束.2.**charAt(int index):**返回指定索引处的 char 值。用法:-**char s=str.charAt(5);**//5指str的下标.3.**contains(CharSequence s):**当且仅当此字符串包含 char 值的指定序列时, 阅读全文
posted @ 2013-09-13 16:03
Demoworld
阅读(496)
评论(0)
推荐(0)
摘要:
class fuxi_6 { static int x = 0; static int y = 0; public static void main(String[] args) { String[] id = new String[20]; id[0] = "62282609890501453X"; id[1] = "524895756658292982"; id[2] = "652555199111226362"; id[3] = "821525200601245613"; id[... 阅读全文
posted @ 2013-09-13 14:08
Demoworld
阅读(7644)
评论(2)
推荐(0)
摘要:
class fuxi_2{ publicstaticvoid main(String[] args){ String s="hello"; int j=s.length()-1; for(int k=0;k=0;k--){ System.out.println(s.charAt(k)); } } } 阅读全文
posted @ 2013-09-13 11:23
Demoworld
阅读(3105)
评论(0)
推荐(0)

浙公网安备 33010602011771号