Related Examples
  1. DecimalFormatSymbols SetZeroDigit() Example
  2. DecimalFormatSymbols SetPerMill() Example
  3. DecimalFormatSymbols SetPercent() Example
  4. DecimalFormatSymbols SetPatternSeparator() Example
  5. DecimalFormatSymbols SetNaN() Example
  6. DecimalFormatSymbols SetMonetaryDecimalSeparator() Example
  7. DecimalFormatSymbols SetMinusSign() Example
  8. DecimalFormatSymbols SetInternationalCurrencySymbol() Example
  9. DecimalFormatSymbols SetInfinity() Example
  10. DecimalFormatSymbols SetGroupingSeparator() Example
  11. DecimalFormatSymbols SetExponentSeparator() Example
  12. DecimalFormatSymbols SetDigit() Example
  13. DecimalFormatSymbols SetDecimalSeparator() Example
  14. DecimalFormatSymbols SetCurrencySymbol() Example
  15. DecimalFormatSymbols SetCurrency() Example
  16. DecimalFormatSymbols HashCode() Example
  17. DecimalFormatSymbols GetZeroDigit() Example
  18. DecimalFormatSymbols GetPerMill() Example
  19. DecimalFormatSymbols GetPercent() Example
  20. DecimalFormatSymbols GetPatternSeparator() Example
  21. DecimalFormatSymbols GetNaN() Example
  22. DecimalFormatSymbols GetMonetaryDecimalSeparator() Example
  23. DecimalFormatSymbols GetMinusSign() Example
  24. DecimalFormatSymbols GetInternationalCurrencySymbol() Example
  25. DecimalFormatSymbols GetInstance1() Example
  26. DecimalFormatSymbols GetInstance() Example
  27. DecimalFormatSymbols GetInfinity() Example
  28. DecimalFormatSymbols GetGroupingSeparator() Example
  29. DecimalFormatSymbols GetExponentSeparator() Example
  30. DecimalFormatSymbols GetDigit() Example
  31. DecimalFormatSymbols GetDecimalSeparator() Example
  32. DecimalFormatSymbols GetCurrencySymbol() Example
  33. DecimalFormatSymbols GetCurrency() Example
  34. DecimalFormatSymbols GetAvailableLocales() Example
  35. DecimalFormatSymbols Equals() Example
  36. DecimalFormatSymbols Clone() Example
  37. Java Class DecimalFormatSymbols, Java DecimalFormatSymbols Methods, Java DecimalFormatSymbols Functions,DecimalFormatSymbols Examples Java

View All Examples
 

DecimalFormatSymbols SetInfinity() Example

Sets the string used to represent infinity.


DecimalFormatSymbolsclass SetInfinity() method example. This example shows you how to use SetInfinity() method.This method Sets the string used to represent infinity.

Here is the code:-

/**
 * @Program that Sets the string used to represent infinity.
 * SetInfinity.java 
 * Author:-RoseIndia Team
 * Date:-14-Jun-2008
 */
import java.text.*;

public class SetInfinity {

    public static void main(String[] args) {
        DecimalFormatSymbols dfs = new DecimalFormatSymbols();
        String c = dfs.getInfinity();
        System.out.println("The string used to represent infinity: " + c);
        dfs.setInfinity("~");
        System.out.println("The string used to represent infinity: " +dfs.getInfinity());
    }
}

Output of the program:-
 The string used to represent infinity: ∞
The string used to represent infinity: ~

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

HOME | COPYRIGHT | CONTACT US