作者TonyQ (骨頭)
看板java
標題Re: 請問一下hashset問題
時間Sat Apr 14 20:33:12 2007
※ 引述《[email protected] (無言)》之銘言:
: 請問一下...底下set後面還有一個<String>這是什麼意思呢..
: 可以教導一下嗎..
: 謝謝!!
: Set<String> set = new HashSet<String>();
1.5以後出現的 Generic type 特性,
意義是宣告這個SET裡面只存放 String 型態的資料。
--
String temp="relax"; | Life just like programing
while(buringlife) String.forgot(temp); | to be right or wrong
while(sleeping) brain.setMemoryOut(); | need not to say
stack.push(life.running); | the compiler will
stack.push(scouting.buck()); | answer your life
stack.push(bowling.practice()); | Bone
everything
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.134.27.68