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

        double x = 12.34;
        double y = -4;

        // call signum for both doubles and print the result
        System.out.println("Math.signum(" + x + ")=" + Math.signum(x));
        System.out.println("Math.signum(" + y + ")=" + Math.signum(y));

    }
}