摘要:
##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 值的指定序列时, 阅读全文
摘要:
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[... 阅读全文
摘要:
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)); } } } 阅读全文