No Math.min(Integer, Integer)?

Discussion in 'Java' started by =?ISO-8859-1?Q?Thomas_Gagn=E9?=, Jul 29, 2003.

  1. // if the following compiles

    Math.min(5, 10);

    // why wouldn't the following?

    Math.min(new Integer(5), new Integer(10);

    I suspect the answer might be because Math doesn't implement min(Integer,
    Integer) but then I would have suspected Integer might have..

    Integer result;

    result = new Integer(5).min(new Integer(10));

    --
    ..tom
    remove dashes in email for replies
    opensource middleware at <http://isectd.sourceforge.net>
     
    =?ISO-8859-1?Q?Thomas_Gagn=E9?=, Jul 29, 2003
    #1
    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. Lois
    Replies:
    1
    Views:
    3,249
    Ryan Stewart
    Dec 27, 2004
  2. juergen
    Replies:
    3
    Views:
    572
    opalinski from opalpaweb
    Sep 20, 2006
  3. Albert Hopkins

    When is min(a, b) != min(b, a)?

    Albert Hopkins, Jan 21, 2008, in forum: Python
    Replies:
    31
    Views:
    835
    Albert van der Horst
    Feb 4, 2008
  4. Philipp
    Replies:
    9
    Views:
    1,133
    Mark Space
    Jul 23, 2008
  5. VK
    Replies:
    15
    Views:
    1,184
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page