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

正文內(nèi)容

第6講面向?qū)ο筇卣?-文庫(kù)吧資料

2024-10-25 13:07本頁(yè)面
  

【正文】 ? public String(byte[] bytes, int offset, int length) ? public String(byte[] bytes, String charsetName) ? public String(char[] value) ? public String(char[] value, int offset, int count) ? public String(String original) 29 ? —字符串 /字符序列 ? 構(gòu)造方法的使用 String s = new String()。 String s7 = (i)。 String s5 = (i, 16)。 String s3 = (i, 2)。 String s1 = (i)。 int i = (s)。 //+38 double largestDouble = 。 //2147483647 long largestLong = 。 //127 short largestShort = 。 (end start)。 ? ? … … … … ? 2723個(gè)類 (class)和接口 (interface) ? 實(shí)現(xiàn) d:\\jre\lib\() ? jar tvf | more 18 ? ? Object類 ? System類 ? Math類 ? 基本數(shù)據(jù)類型的包裝類 ? 字符串操作類 ? String類 ? StringBuffer類 ? StringTokenizer類 ( ) ? Runtime類 19 ? Class Object is the root of the class hierarchy. Every class has Object as a superclass. ? All objects, including arrays, implement the methods of this class. ? 子類可以對(duì) Object類的方法進(jìn)行重寫(xiě) 構(gòu)造方法 public Object() 實(shí)例方法 1. protected Object clone() throws CloneNotSupportedException 2. public boolean equals(Object obj) 3. protected void finalize() throws Throwable 4. public final Class getClass() 5. public int hashCode() 6. public final void notify() 7. public final void notifyAll() 8. public String toString() 9. public final void wait() throws InterruptedException 10. public final void wait(long timeout) throws InterruptedException 11. public final void wait(long timeout, int nanos) throws InterruptedException 20 ? 靜態(tài)變量 ? public static final InputStream in (標(biāo)準(zhǔn)輸入流 ) ? public static final PrintStream out (標(biāo)準(zhǔn)輸出流 ) ? public static final PrintStream err (標(biāo)準(zhǔn)錯(cuò)誤輸出流 ) ? 靜態(tài)方法 ? public static void arraycopy(Object src, int srcPos, Object dest, int destPos,int length) ? public static void exit(int status) ? public static void gc() ? public static long currentTimeMillis() ? … … … … 21 ? 獲取當(dāng)前時(shí)間 ? public static long currentTimeMillis() ? Returns: the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC (Universal time coordinated). public static void main(String args[]) { long start = ()。 ? 。 ? 。d:\src 17 常用工具類 ? Java 2 Platform Packages ? JavaTM 2 Platform, Standard Edition, v API Specification ? Java語(yǔ)言基礎(chǔ)類、 Java類庫(kù) ? 定義描述見(jiàn) Java2SDK文檔 ? 135個(gè)包 (package) ? 。. 執(zhí)行 (在其他目錄 ) d:\ java –classpath d:\src1。 public class Test { . . . } class文件 () d:\src1\\jalpha\*.class class文件 () d:\src2\\w3c\*.class d:\src 執(zhí)行 (在根目錄 ) d:\src java –classpath d:\src1。 import .*。 … … } 15 包與 Java文件的對(duì)應(yīng)關(guān)系 package 。 class Test { … … c = new ()。 } import graphics.*。 import mygraphics.*。 public class Circle { . . . } // package mygraphics。 … … Circle myCir = new Circle()。 … … Circle myCir = new Circle()。 public class Circle extends Graphic implements Draggable { . . . } ? 利用包成員的規(guī)范名 (包名 +類名 ) myCir = new ()。 reference to YELLOW is ambiguous, both variable YELLOW in RainbowColors and variable YELLOW in PrintColors match 9 ? 為什么需要包 ? ? 使 Java類更容易發(fā)現(xiàn)和使用 ? 防止命名沖突 ? 進(jìn)行訪問(wèn)控制 ? 層次結(jié)構(gòu),特定的功能 ? A package is a collection of related classes and interfaces providing access protection and namespace management. ? import 包 (package) 10 // file public abstract class Graphic { . . . } // file public class
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1