aspose file tools*
The moose likes Beginning Java and the fly likes How to determine min of two int values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to determine min of two int values" Watch "How to determine min of two int values" New topic
Author

How to determine min of two int values

Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

Is there a way to determine the min value between two int values?

I have two recordsets that I am getting the row count of each recordset:

int rsRowCount = rs.getRowCount();

int rs1RowCount = rs1.getRowCount();

I need to get the value of the rowcount that is determined to be the min value between the two.

Any help or direction would be greatly appreciated.

Regards.
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3739
    
  16
Have you had a look at the Math class to see if there might be anything useful in there ?


Joanne
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

No I have not. Thanks for the direction.

Regards.
seema prakash
Ranch Hand

Joined: Nov 17, 2004
Posts: 59
int minRowCount = Math.min(rsRowCount,rs1RowCount);
Melinda Savoy
Ranch Hand

Joined: Jun 21, 2005
Posts: 387

Joanne -- thanks so much I got it.

Seema - thanks anyway. Your reply is appreciated.

Regards.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to determine min of two int values