SIGHUP error in java

`/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{

    public static void main (String[] args) throws java.lang.Exception
    {
        Scanner prevRatings = new Scanner(System.in);

        Scanner contestChanges = new Scanner(System.in);

        int rone = prevRatings.nextInt();
        int rtwo = prevRatings.nextInt();

        int done = contestChanges.nextInt();
        int dtwo = contestChanges.nextInt();

        int finalone = rone + done;
        int finaltwo = rtwo + dtwo;

        if (finalone > finaltwo) {
            System.out.println("Dominator");
        } else if (finaltwo > finalone) {
            System.out.println("Everule");
        } else {
        }
    }
}
`

I need help with this code. it works flawlessly in an offline ide but gives me a SIGHUP Runtime Error when i run it online. It says-

1 Like
import java.util.*;
import java.io.*;
public class Main
{
    public static void main (String [] args)
    {
        Scanner PrevRatings = new Scanner (System.in);
        System.out.println("Enter the Value of rone and rtwo");
        int rone = PrevRatings.nextInt();
        int rtwo = PrevRatings.nextInt();
        
        Scanner ContestChanges = new Scanner (System.in);
        System.out.println("Enter the Value of done and dtwo");
        int done = ContestChanges.nextInt();
        int dtwo = ContestChanges.nextInt();
        
        int finalone = (rone + done);
        int finaltwo = (rtwo + dtwo);
        
        if (finalone > finaltwo)
        {
            System.out.println("Dominator");    
        }
        else if (finaltwo > finalone)
        {
            System.out.println("Everule");
        }
        else
        {
            System.out.println("Equality"); // You can write whatever you want.
        }
    }
}

I hope this will help…

1 Like