title: Index 0 out of bounds for length 0
body: <p>Here i am getting this error:
  Exception in thread &quot;main&quot; java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0</p>
  <pre><code>public static void main(String[] args) {
      Scanner keyboard  = new Scanner(System.in);
      String input = keyboard.nextLine();
      System.out.println(input);
      while(true){
          if(args[0].equals(&quot;k&quot;)){
              System.out.println(&quot;k&quot;);
          }
      }
  }
  </code></pre>