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) {

        BigDecimal bg1 = new BigDecimal("123.23");
        BigDecimal bg2 = new BigDecimal("12323");

        BigDecimal bg3 = bg1.movePointLeft(3); // 3 points left
        BigDecimal bg4 = bg2.movePointLeft(-2);// 2 points right

        // print bg3, bg4 values
        System.out.println(bg3);
        System.out.println(bg4);
    }
}