public class Api {@Testpublic void StringApi(){// equals() 判斷內容是否相同區分大小寫// equalsIgnoreCase() 判斷內容是否相同不區分大小寫// length() 獲取長度// charAt(int index) 獲取某個索引位置的字符// toCharArray() 字符串轉換為字符數組// substring(int beginIndex,int endIndex) 截取內容,包前不包后// substring(int beginIndex) 從當前索引一直截取// replace(CharSequence targer,CharSequence replacement) 對文字進行替換// contains(CharSequence s) 判斷字符中是否存在// starsWiths(String prefix) 已什么字符開始// split(String s) 分割}@Testpublic void ArraryApi(){// add() 添加一個元素在數組的最后一位// get() 獲取某個索引下的元素值// size() 獲取集合的個數// remove(int index) 刪除某個索引位置下的元素值,并返回被刪除的元素值// remove(Object o) 直接刪除元素值,返回布爾值// set(int index,E element) 修改某個位置的元素值,返回修改前的值//}}