1和0

下面语句会出错吗?
你感觉哪一句不会出错呢?

public class Test01
{
    public static void main(String[] atgs)
    {
        System.out.println(1.0/0.0);
        System.out.println(1.0/0);
        System.out.println(1/0.0);
        System.out.println(1/0);
        System.out.println(0/0);
    }
}

你对java中的无穷大和非数了解吗?

Comments are closed.