Java DateFormatSymbols getLocalPatternChars() Example

DateFormatSymbols class getLocalPatternChars() method example. This example shows you how to use getLocalPatternChars() method.


Syntax is : public String getLocalPatternChars()
Method returns localized date-time pattern characters. For example: 'u', 't', etc.

Here is the code.
/**
 * @(#) GetLocalPatternCharsDateFormatSymbols.java
 * A class representing use of method getLocalPatternChars() of DateFormatSymbols
class in java.text Package.
 * @Version  14-May-2008
 @author   Rose India Team
 */
import java.text.*;

class GetLocalPatternCharsDateFormatSymbols {

    public static void main(String[] args) {

        // Create new DateFormatSymbols object.
        DateFormatSymbols dFormatSymbols = DateFormatSymbols.getInstance();

        // getLocalPatternChars method call for DateFormatSymbols object.
        String str = dFormatSymbols.getLocalPatternChars();
        System.out.println("Localized date-time pattern characters : " + str);
    }
}

Output of the program.
 Localized date-time pattern characters : GyMdkHmsSEDFwWahKzZ

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US