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

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -