2012年11月30日 星期五

認識字串



  • String 類別
    • String物件上的方法
    • 字串剖析數值型態
    • 取得字串中的字元方法
  • 不可變字串
  • StringBuilder類別

字串也是可物件。所以在Java執從時,會有一個所謂的String 池,存在相同的String內容就直接取得,而不是額外在建立一個新的物件,要不然相較之下這樣是會耗記憶體比較多。


  • 命令列引數 command line argument

2012年11月2日 星期五

the first programing

System.out.println("Hello! World");

java.lang 套件
system 類別
out 物件
println 方法
()      參數

import java.lang

system.out.println("Hello! World");