/* package whatever; // don't place package name! */ import java.util.*;import java.lang.*;import java.io.*;import java.math.BigDecimal; /* Name of the class has to be "Main" only if the class is public. */class Ideone{ public static void main (String[] args) throws java.lang.Exception { BigDecimal v1 = new BigDecimal(100); BigDecimal v2 = new BigDecimal(15); BigDecimal v3 = v1.divide(v2); System.out.println(v3); }}
Standard input is empty
Standard output is empty
Exception in thread "main" java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result. at java.math.BigDecimal.divide(BigDecimal.java:1690) at Ideone.main(Main.java:15)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!