Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0

Kailash Sahu 141 Reputation points
2022-05-08T20:42:29.58+00:00

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0

  import java.util.Scanner;

     public class diss{

public static void main(String[] args) {
    int a = Integer.parseInt(args[0]);
    int b = Integer.parseInt(args[1]);
    boolean res = (a%b==0 || b%a==0);
    System.out.println("result=" + res);

} 

  }
Developer technologies C#
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.