arraylist - How to create a read-only list in java without using unmodifiablelist method from collections API? -


an interviewer asked me question create read-only list in java without using collections api method.any thoughts on how can achieve ?

just extend abstractlist, , docs mention:

to implement unmodifiable list, programmer needs extend class , provide implementations get(int) , size() methods.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -