Results 1 to 2 of 2
  1. #1
    diskhub is offline Member
    Join Date
    May 2010
    Posts
    25
    Rep Power
    0

    Default customize formatter class to take in custom format?

    Hi,
    I was told that there's formatter class that i can use in Java to replace certain character format in the string with a string, number, float...

    but formatter class only does the standard, %f, %s, %d....

    Can i add customer format to the formatter like %o, %i....

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,733
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by diskhub View Post
    Hi,
    I was told that there's formatter class that i can use in Java to replace certain character format in the string with a string, number, float...
    but formatter class only does the standard, %f, %s, %d....
    Can i add customer format to the formatter like %o, %i....
    This is a sequel to your replacing %x with "apple" question isn't it? To answer your question: no those format characters are fixed, but why use a Formatter at all? Have a look at the String.replace( ... ) method; it can do the job.

    kind regards,

    Jos

Similar Threads

  1. Custom Format a Textbox in PDF Forms
    By keelyn in forum New To Java
    Replies: 0
    Last Post: 08-11-2009, 08:14 AM
  2. Format of class file
    By makpandian in forum New To Java
    Replies: 15
    Last Post: 05-07-2009, 03:40 PM
  3. Custom class in an array?
    By bugmenot in forum New To Java
    Replies: 5
    Last Post: 04-15-2009, 01:10 AM
  4. Importing custom class
    By BigRed in forum Eclipse
    Replies: 2
    Last Post: 02-14-2009, 03:12 PM
  5. Importing a Custom Class
    By jfredrickson in forum New To Java
    Replies: 3
    Last Post: 07-11-2007, 12:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •