Hi Ranchers!!
My problem is why infinity be casted, means how is it possible. Second problem is after casting how the result be determined? What is the rule for this type of casting?
Please help me
class q1{
public static void main(
String args[]){
double d1 = -9.0;
double d2 = 0.0;
d1 = d1/d2; // d1 = -Infinity
System.out.println((byte) d1); //print 0
System.out.println((int) d1); //print -2147483648
System.out.println((long) d1); //print -9223372036854775808
}
}
regards
Farhan
[This message has been edited by Farhan Tariq (edited June 02, 2001).]