SCJP題庫第175題

two scenarios are NOT safe to replace a StringBuffer object with a StringBuilder object? (Choose two.)
A. When using versions of Java technology earlier than 5.0.
B. When sharing a StringBuffer among multiple threads.
C. When using the java.io class StringBufferInputStream.
D. When you plan to reuse the StringBuffer to build more than one string.
E. Enitiation of separate design processes to the separation of users

Ans: AB

解說:
此題問: 那二個情境在置換StringBuffer物件是不安全的?
A 使用JDK5.0之前的版本
B 在多個執行緒之前分享StringBuffer物件

Comments

Popular posts from this blog

Android-使用webview在V3版的Google地圖GPS定位