them 5.0 language additions

Discussion in 'Java' started by opalpa@gmail.com, May 23, 2005.

  1. Guest

    Peeked at
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html, 5.0
    javadoc for collections and it has stuff like:

    binarySearch(List<? extends Comparable<? super T>> list, T key)

    This used to be simple:

    binarySearch(List list, Object key, Comparator c)

    Generics have made code a bit simpler to write, my opinion anway.
    However mkaing the javadoc look like C++ code is not to my liking.

    <? looks like an html formating error, but I doubt it.
     
    , May 23, 2005
    #1
    1. Advertising

  2. Wibble Guest

    Angle brackets smelled in C++, and java smells like C++ but funnier.

    wrote:
    > Peeked at
    > http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html, 5.0
    > javadoc for collections and it has stuff like:
    >
    > binarySearch(List<? extends Comparable<? super T>> list, T key)
    >
    > This used to be simple:
    >
    > binarySearch(List list, Object key, Comparator c)
    >
    > Generics have made code a bit simpler to write, my opinion anway.
    > However mkaing the javadoc look like C++ code is not to my liking.
    >
    > <? looks like an html formating error, but I doubt it.
    >
     
    Wibble, May 24, 2005
    #2
    1. Advertising

  3. Wayne Guest

    wrote:
    > Peeked at
    > http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html, 5.0
    > javadoc for collections and it has stuff like:
    >
    > binarySearch(List<? extends Comparable<? super T>> list, T key)
    >
    > This used to be simple:
    >
    > binarySearch(List list, Object key, Comparator c)
    >
    > Generics have made code a bit simpler to write, my opinion anway.
    > However mkaing the javadoc look like C++ code is not to my liking.
    >
    > <? looks like an html formating error, but I doubt it.
    >


    It's not a formatting error. There are several short, readable
    intoductions to generics with the JDK documentation and elsewhere.
    Please note you don't have to use 'em! The old way works fine.
    The new way is better and usually leads to less (and more readable)
    code, but it is one more thing you need to learn.

    Try these links:

    Overview of new J5 features:
    http://java.sun.com/features/2003/05/bloch_qa.html
    http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html

    Generics:
    http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf

    Hope this helps!

    -Wayne
     
    Wayne, May 24, 2005
    #3
  4. Wibble Guest

    I like generics, just think the syntax is ugly and hard to read.
    What can ya do...

    Wayne wrote:
    > wrote:
    >
    >> Peeked at
    >> http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html, 5.0
    >> javadoc for collections and it has stuff like:
    >>
    >> binarySearch(List<? extends Comparable<? super T>> list, T key)
    >>
    >> This used to be simple:
    >>
    >> binarySearch(List list, Object key, Comparator c)
    >>
    >> Generics have made code a bit simpler to write, my opinion anway.
    >> However mkaing the javadoc look like C++ code is not to my liking.
    >>
    >> <? looks like an html formating error, but I doubt it.
    >>

    >
    > It's not a formatting error. There are several short, readable
    > intoductions to generics with the JDK documentation and elsewhere.
    > Please note you don't have to use 'em! The old way works fine.
    > The new way is better and usually leads to less (and more readable)
    > code, but it is one more thing you need to learn.
    >
    > Try these links:
    >
    > Overview of new J5 features:
    > http://java.sun.com/features/2003/05/bloch_qa.html
    > http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html
    >
    > Generics:
    > http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf
    >
    > Hope this helps!
    >
    > -Wayne
     
    Wibble, May 24, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Horoschak

    Auction website additions

    Dave Horoschak, Mar 6, 2004, in forum: Perl
    Replies:
    0
    Views:
    554
    Dave Horoschak
    Mar 6, 2004
  2. Matthew MacDonald

    Consecutive Additions of Controls

    Matthew MacDonald, Aug 24, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    386
    Matthew MacDonald
    Aug 26, 2004
  3. melledge
    Replies:
    0
    Views:
    373
    melledge
    Oct 4, 2005
  4. Anonieko

    HttpHandlers - Learn Them. Use Them.

    Anonieko, Jun 15, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    542
    tdavisjr
    Jun 16, 2006
  5. why the lucky stiff
    Replies:
    5
    Views:
    155
    why the lucky stiff
    Sep 22, 2004
Loading...

Share This Page