Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {

    public static void main(String[] args) {

        float x = 1.2345f;
        float y = -123.45f;

        System.out.println(Math.abs(x));
        System.out.println(Math.abs(y));
        System.out.println(Math.abs(-123.0f));
    }
}