Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.math.BigDecimal;

public class Main {

    public static void main(String[] args) {
        Long l = new Long("12345678");

        // assign the bigdecimal value of l to bg scale is 4
        BigDecimal bg = BigDecimal.valueOf(l, 4);

        System.out.println(bg);
    }
}