Wednesday 26 September 2012

Type Casting

/* Simple Type casting program */
class cast
{
public static void main(String args[])
{
double a=5.35, b=55.6;
int rem;
rem = (int)a% (int)b;
System.out.println("Remainder : "+rem);
}
}

/* Output
Remainder : 5 */

0 comments:

Post a Comment