Results 1 to 4 of 4
  1. #1
    ortollj is offline Member
    Join Date
    Oct 2009
    Posts
    10
    Rep Power
    0

    Unhappy String.format not in javadoc

    Bonjour
    pourquoi je ne trouve pas la fonction de class String.format
    trouvé sur
    java.sun.com/docs/books/tutorial/java/data/strings.html dont voici un extrait

    you can write
    String fs;
    fs = String.format("The value of the float variable is %f, while the value of the " + "integer variable is %d, and the string is %s", floatVar, intVar, stringVar);
    System.out.println(fs);

    dans la doc de la class String sur
    java.sun.com/j2se/1.4.2/docs/api/

    :eek::o

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    String.format was introduced in Java 1.5 and can't be found in the 1.4 API. But you will find it in the 1.5, 1.6 and any later APIs:

    String#format(...)
    Last edited by Fubarable; 11-08-2009 at 05:04 PM.

  3. #3
    ortollj is offline Member
    Join Date
    Oct 2009
    Posts
    10
    Rep Power
    0

    Default

    first sorry for the french, I forgot I was on english site !
    ok I found it on

    java.sun.com/j2se/1.5.0/docs/api/

    I was not aware that I did not use the last doc,
    is this one (just 2 line above) the last one ?
    thank you.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by ortollj View Post
    first sorry for the french, I forgot I was on english site !
    No problem. I think that your intent was obvious.

    I was not aware that I did not use the last doc,
    is this one (just 2 line above) the last one ?
    thank you.
    Best to ask Sun this: Java APIs

Similar Threads

  1. spliting a string and checking each token's format
    By Implode in forum New To Java
    Replies: 1
    Last Post: 10-18-2009, 08:41 PM
  2. Replies: 0
    Last Post: 04-02-2009, 07:02 PM
  3. HOw to run ant javadoc
    By Manfizy in forum New To Java
    Replies: 24
    Last Post: 02-18-2009, 09:59 PM
  4. how to convert one format to another format
    By mahipal_reddy621 in forum New To Java
    Replies: 1
    Last Post: 12-02-2008, 10:21 AM
  5. Replies: 1
    Last Post: 04-09-2008, 02:15 AM

Posting Permissions

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