|
Java™ by example!
|
|
|
What are the changes to java.text.MessageFormat in JDK1.5?
Before the new 1.5 feature that allows for a variable number of arguments in methods, the class MessageFormat could only be using an array of Objects as shown in the following example
Main.java:
With 1.5, there is a new overloaded format method declared as follows:
This allows you to rewrite the above code as follows:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|