Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.math.BigDecimal;
import java.math.MathContext;

public class Main {

    public static void main(String[] args) {
        MathContext mc = new MathContext(3);
        char[] ch = new char[] { '1', '2', '3', '4', '5', '6', '7' };
        BigDecimal bg1 = new BigDecimal(ch, mc);
        System.out.println(bg1);

    }
}