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 = 1234.1234f;
        float y = -1234.123f;

        // find the closest int for these floats
        System.out.println("Math.round(" + x + ")=" + Math.round(x));
        System.out.println("Math.round(" + y + ")=" + Math.round(y));

    }
}