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

        // returns 1 as int value is greater than 1
        System.out.println(Integer.signum(5));

        // returns -1 as int value is less than 1
        System.out.println(Integer.signum(-5));

        // returns 0 as int value is equal to 0
        System.out.println(Integer.signum(0));
    }
}