Questions #Tagged [exception]

Questions: 2

What is the 403 Forbidden Error and how to resolve this error?

403 Forbidden Error is HTTP status code which means that you don't have permission to access the server for which you are trying to reach. Below are some of the examples of these errors:<br> <pre><xmp> HTTP Error 403 - Forbidden 403 forbidden request forbidden by administrative rules 403 Forbidden Access Denied You don't have permission to access Forbidden: You don't have permission to access [directory] on this server</xmp></pre> <p>This error occurs due to:<br><br> &#9679 Incorrect file or folder permissions<br> &#9679 Incorrect settings in the .htaccess file<br><br> Follow below steps in order to fix the 403 forbidden error:<br><br> &#9679 Check or reset/rename your .htaccess file<br> &#9679 Reset file and folder permissions<br> &#9679 Disable WordPress plugins<br> </p>


#.htaccess     #html     #error     #exception    

How to avoid ArrayIndexOutOfBoundsException in Java?

The ArrayIndexOutOfBoundsException in Java occurs whenever someone try to access any item of an array at an index which is not present in the array. In other words, the index may be negative or exceed the size of an array.<br><br> The ArrayIndexOutOfBoundsException is a subclass of IndexOutOfBoundsException, and it implements the Serializable interface.<br><br> We can avoid this exception by using a type-safe Iterator. These are the iterators which allow modifications of a collection while iterating over it.<br><br> <pre>HashMap<Integer,Integer> map = new HashMap<>(); map.put(1,1); map.put(2,2); map.put(3,3); map.put(4,4); final Iterator<Integer> it = map.Keyset().iterator(); for (int i = 0; it.hasNext(); i++) { System.out.println(; } </pre>


#java     #exception     #core-java