ArrayIndexOutOfBounds exception in main method

后端 未结 4 1239
不思量自难忘°
不思量自难忘° 2021-01-25 18:53

I am getting array bound error but to my mind, array starts from 0, so what is wrong with this code?

public class Quadratic {

    public static void main(String         


        
4条回答
  •  [愿得一人]
    2021-01-25 19:27

    Try and debug it. print the size of args using System.out.println(args.length);. if the size is smaller then 2 your not getting the parameters to your main class.

提交回复
热议问题