java.lang.ArrayIndexOutOfBoundsException: -1

Stack Overflow | Sheetal Jain | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Null pointer Exception while reversing a Queue using stack

    Stack Overflow | 7 months ago | Sheetal Jain
    java.lang.ArrayIndexOutOfBoundsException: -1

    Root Cause Analysis

    1. java.lang.ArrayIndexOutOfBoundsException

      -1

      at com.tcs.QueueUsingAraay.QueueImpl.dequeue()
    2. com.tcs.QueueUsingAraay
      QueueImpl.main
      1. com.tcs.QueueUsingAraay.QueueImpl.dequeue(QueueImpl.java:51)
      2. com.tcs.QueueUsingAraay.QueueImpl.reverse(QueueImpl.java:93)
      3. com.tcs.QueueUsingAraay.QueueImpl.main(QueueImpl.java:78)
      3 frames