freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[工學(xué)]第7章 字符串-預(yù)覽頁

2025-11-08 18:49 上一頁面

下一頁面
 

【正文】 String s1 = “sun java”, s2 = “Sun Java”。 ((“Java”))。 String sr = (?我’ , ?你’ )。 ((“Wele”))。 (sL)。 subS = (11, 12)。 } } //true //wele to java world! //WELCOME TO JAVA WORLD! //Java World! //false //sun java //J Objectoriented programming 第七章 字符串 String類常用方法( 3) ? 靜態(tài)重載方法 ? public static String valueOf(……) 可以將基本類型數(shù)據(jù)轉(zhuǎn)換為字符串,例如: public static String valueOf(double d) public static String valueOf(int i) ……… ? 方法 public String[] split(String regex)可以將一個字符串按照指定的分隔符分隔,返回分隔后的 字符串?dāng)?shù)組 。” )。i。 String對象的比較 String s1 = “abcdef”。 String s2 = “StringBuffer”。 (s2)。 ? StringBuffer和 String類似,但 StringBuffer可以對其字符串進行改變。 Objectoriented programming 第七章 字符串 StringBuffer常用方法( 3) ? 和 String類含義 類似 的方法: ? public int indexOf(String str) ? public int indexOf(String str,int fromIndex) ? public String substring(int start) ? public String substring(int start,int end) ? public int length() ? 方法 public StringBuffer reverse()用于將字符序列逆序, 返回修改后的該 StringBuffer對象引用 。 (?/?).append(“IBM”).append(?/?).append(“Sun”)。i=9。 (sb2)。 ? 而 StringBuffer在操作上是在一個 緩沖 中進行的,性能當(dāng)然優(yōu)越得多。 str1 = str1 + str2。 ? 以 , 構(gòu)造方法 : ? Integer(int value) ? Integer(String s) Objectoriented programming 第七章 字符串 包裝類常見方法 ? 以下方法以 方法 說明 public long longValue() 返回封裝數(shù)據(jù)的 long型值 public double doubleValue() 返回封裝數(shù)據(jù)的 double型值 pulbic int intValue() 返回封裝數(shù)據(jù)的 int型值 public static int parseInt(String s) throws NumberFormatException 將字符串解析成 int型數(shù)據(jù),返回該數(shù)據(jù) public static Integer valueOf(String s) throws NumberFormatException 返回 Integer對象,其中封裝的整形數(shù)據(jù)為字符串 s所表示 Objectoriented programming 第七章 字符串 包裝類舉例 public class Test{ public static void main(String args[]){ Integer i = new Integer(100)。 (j)。 double s = pi*r*r。 ((123)+”B”)。息進行封裝, sql包對時間的封裝, 的日歷系統(tǒng)來解釋 Date對象。 ? Date(long date) 第二個構(gòu)造方法中的參數(shù)表示自從標(biāo)準(zhǔn)基準(zhǔn)時間(稱為 “ 歷元( epoch) ” ,即 1970年 1月 1日 00:00:00 GMT)以來的指定毫秒數(shù)。這些字段和方法被定義為 protected。 Calendar對象調(diào)用 get()方法可以獲取有關(guān)年、月、日等時間信息,參數(shù) field的有效值由 Calendar靜態(tài)常量指定??梢愿鶕?jù)需要使用 applyPattern方法來修改
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1