Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > No Math.min(Integer, Integer)?

Thread Tools

No Math.min(Integer, Integer)?

Posts: n/a
// 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));

remove dashes in email for replies
opensource middleware at <>

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off