What is the output of the following code.
public class Main{ public static void main(String[] args) { System.out.println(0F/0); System.out.println(0.1/0); System.out.println(-0.1F/0); } }
NaN Infinity -Infinity
public class Main{ public static void main(String[] args) { System.out.println(0F/0);/*from www.jav a2 s . c o m*/ System.out.println(0.1/0); System.out.println(-0.1F/0); } }
Infinity has positive and negative.