Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
    
    
  
  
    
    
  
  
java.text
  Provides classes and interfaces for handling text, dates, numbers,
 and messages in a manner independent of natural languages.  This
 means your main application or applet can be written to be
 language-independent, and it can rely upon separate,
 dynamically-linked localized resources. This allows the flexibility
 of adding localizations for new localizations at any time.
 
These classes are capable of formatting dates, numbers, and
 messages, parsing; searching and sorting strings; and iterating
 over characters, words, sentences, and line breaks.  This package
 contains three main groups of classes and interfaces:
 
 - Classes for iteration over text
 
- Classes for formatting and parsing
 
- Classes for string collation
 
Interfaces
    
  
  
  
  
    Classes
    
  
  
    
      
        | Annotation | An Annotation object is used as a wrapper for a text attribute value if
 the attribute has annotation characteristics. | 
      
    
      
        | AttributedCharacterIterator.Attribute | Defines attribute keys that are used to identify text attributes. | 
      
    
      
        | AttributedString | An AttributedString holds text and related attribute information. | 
      
    
      
        | Bidi | This class implements the Unicode Bidirectional Algorithm. | 
      
    
      
        | BreakIterator | The BreakIteratorclass implements methods for finding
 the location of boundaries in text. | 
      
    
      
        | ChoiceFormat | A ChoiceFormatallows you to attach a format to a range of numbers. | 
      
    
      
        | CollationElementIterator | The CollationElementIteratorclass is used as an iterator
 to walk through each character of an international string. | 
      
    
      
        | CollationKey | A CollationKeyrepresents aStringunder the
 rules of a specificCollatorobject. | 
      
    
      
        | Collator | The Collatorclass performs locale-sensitiveStringcomparison. | 
      
    
      
        | DateFormat | DateFormatis an abstract class for date/time formatting subclasses which
 formats and parses dates or time in a language-independent manner. | 
      
    
      
        | DateFormat.Field | Defines constants that are used as attribute keys in the AttributedCharacterIteratorreturned
 fromDateFormat.formatToCharacterIteratorand as
 field identifiers inFieldPosition. | 
      
    
      
        | DateFormatSymbols | DateFormatSymbolsis a public class for encapsulating
 localizable date-time formatting data, such as the names of the
 months, the names of the days of the week, and the time zone data. | 
      
    
      
        | DecimalFormat | DecimalFormatis a concrete subclass ofNumberFormatthat formats decimal numbers. | 
      
    
      
        | DecimalFormatSymbols | This class represents the set of symbols (such as the decimal separator,
 the grouping separator, and so on) needed by DecimalFormatto format numbers. | 
      
    
      
        | FieldPosition | FieldPositionis a simple class used byFormatand its subclasses to identify fields in formatted output. | 
      
    
      
        | Format | Formatis an abstract base class for formatting locale-sensitive
 information such as dates, messages, and numbers. | 
      
    
      
        | Format.Field | Defines constants that are used as attribute keys in the AttributedCharacterIteratorreturned
 fromFormat.formatToCharacterIteratorand as
 field identifiers inFieldPosition. | 
      
    
      
        | MessageFormat | MessageFormatprovides a means to produce concatenated
 messages in a language-neutral way. | 
      
    
      
        | MessageFormat.Field | Defines constants that are used as attribute keys in the AttributedCharacterIteratorreturned
 fromMessageFormat.formatToCharacterIterator. | 
      
    
      
        | Normalizer | This class provides the method normalizewhich transforms Unicode
 text into an equivalent composed or decomposed form, allowing for easier
 sorting and searching of text. | 
      
    
      
        | NumberFormat | NumberFormatis the abstract base class for all number
 formats. | 
      
    
      
        | NumberFormat.Field | Defines constants that are used as attribute keys in the AttributedCharacterIteratorreturned
 fromNumberFormat.formatToCharacterIteratorand as
 field identifiers inFieldPosition. | 
      
    
      
        | ParsePosition | ParsePositionis a simple class used byFormatand its subclasses to keep track of the current position during parsing. | 
      
    
      
        | RuleBasedCollator | The RuleBasedCollatorclass is a concrete subclass ofCollatorthat provides a simple, data-driven, table
 collator. | 
      
    
      
        | SimpleDateFormat | SimpleDateFormatis a concrete class for formatting and
 parsing dates in a locale-sensitive manner. | 
      
    
      
        | StringCharacterIterator | StringCharacterIteratorimplements theCharacterIteratorprotocol for aString. | 
      
    
  
  
  
    Enums
    
  
  
  
  
    Exceptions
    
  
  
    
      
        | ParseException | Signals that an error has been reached unexpectedly
 while parsing. | 
      
    
  
  
  
 
  
  
    
    
    - Interfaces
- Classes
- Enums
- Exceptions
 
 
  
  
    
  
 
  
    
      
      
    
    
      
    
    
  
       
    
    
      
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2025-02-10 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]