wood burning stoves 2.0*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 386

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: 3168
    
  10
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: 386

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: 386

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
 
Similar Threads
fields of visibility
Question from danchisholm
Programmatically set the knob position of a JScrollBar
getRGB method
help with parameter passing