Array - bubble sort challenge

Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: 4
at Main.bubbleSort(Main.java:28)
at Main.main(Main.java:10)
this error is coming in the next post i will share the code

@Naman_Gupta,

You can share your code in the same post. You can use https://ide.codingblocks.com/ to share your code

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.