java使用MessageFormat便捷拼接字符串

MessageFormat能夠設置替換符。例(來自JDK1.6文檔): 第一個例子使用靜態的方法 MessageFormat.format,它在內部建立一個只使用一次的 MessageFormat: int planet = 7; String event = "a disturbance in the Force"; String result = MessageFormat.format( "
相關文章
相關標籤/搜索