
640 • Java Programming
System.out.println(s);
}
public static void main(String[] args)
{
boolean b1 = new Double (35 / 0.).isInfinite();
boolean b2 = Double. isInfinite(35 / 0.);
show(“35/0 is infinite: “ + (b1 && b2));
b1 = new Double (0 / 0.).isNaN();
b2 = Double.isNaN (0 / 0.);
Show(“0/0 is Not a Number : “ + (b1 && b2));
}
}
( a) 35/0 is infi nite: true
0/0 is Not a Number: true
( b) 35/0 is infi nite: true
0/0 is Not a Number: false
( c) Undefi ned (Error Message)
( d) None of the above
8. Which of the following methods returns a string
representation of ...