cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Converting Float to Int

Former Member
0 Likes
6,574

HI,

How could I convert float value to Int and pass ? I am using UDF ..

Eg:

11:9999999 I want to pass 12, Its a run time Program so dont know how the value would be...

Is there any function to round it off?

Thanks

Rajeev

View Entire Topic
smavachee
Active Contributor
0 Likes

Hi Rajiv,

For converting the float into an integer, simply applied the type casting process and get the integer value.

public class UDF

{

static float f = 90.0F;

public static void main(String arg[])

{

int i = (int)f;

}

}

Thanks

Sunil M