Exception and Serialization Problems
I have some problems on using the exception and serialization.
1) Is ListException class used to handle the RuntimeException?
2) Is ListIndexOutOfBoundsException class used to handle the IndexOutOfBoundsException?
3) I can find an exception has been thrown to both of ListException and ListIndexOutOfBoundsException in add class (but not the get and remove classes) of ListInterface.java.
Is it because of the add class can be functional until all the system memory has been used up (unpredictable) and so an exception has been thrown to both of ListException and ListIndexOutOfBoundsException?
4) However, I canít find an exception has been thrown to ListException (but ListIndexOutOfBoundsException only) in add class of ListReferenceBased.java.
What is the reason?
5) For the serialVersionUID, is it used for handling an exception only? What is the major purpose for setting it (able to run the program in cross platform under serialization)?
Please find the attached file for your reference.
Thank you very much!