Results 1 to 1 of 1
Thread: How to use MessageFormat class
-
How to use MessageFormat class
This example will show the use of the MessageFormat class to format the message. With the help of this class you can paramerterize the message.
Java Code:import java.text.MessageFormat; public class MessageFormatExp { public static void main(String[] args) { Object[] params = new Object[] { "Tom", "Dick" }; String message = MessageFormat.format("{0} and {1} are good friends", params); System.out.println(message); } }
Similar Threads
-
what is the Priority for execution of Interface class and a Abstract class
By Santoshbk in forum Advanced JavaReplies: 0Last Post: 04-02-2008, 07:04 AM -
Accessing inner class from outer class (an example)
By Java Tip in forum Java TipReplies: 0Last Post: 02-17-2008, 09:03 AM -
An example of accessing outer class from inner class
By Java Tip in forum Java TipReplies: 0Last Post: 02-17-2008, 09:01 AM -
Inner class accessing outer class
By Java Tip in forum Java TipReplies: 0Last Post: 02-17-2008, 08:59 AM -
Accessing one class from another class through swing
By kbyrne in forum AWT / SwingReplies: 5Last Post: 01-03-2008, 07:54 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks