
To know how dose List.remove(Object) work, I do many test sample. But I still feel not very realizing. Finally, I?took a look at?souce code, and then I knew everything!
















2. remove(Object) will remove the first reference in List which refer to?the object
3. If you want to change an object to a new index: back up it--> remove it--> re-add it

I create a class to handle something annotated by Annotations. But it doesn't work. I found out it is returned false by Class.getMethod().isAnnotationPresent(Todo.class). Finally, I got the reason by reading source code.
public?enum?RetentionPolicy?{
????/**
?????*?Annotations?are?to?be?discarded?by?the?compiler.
?????*/
????SOURCE,
????/**
?????*?Annotations?are?to?be?recorded?in?the?class?file?by?the?compiler
?????*?but?need?not?be?retained?by?the?VM?at?run?time.??This?is?the?default
?????*?behavior.
?????*/
????CLASS,
????/**
?????*?Annotations?are?to?be?recorded?in?the?class?file?by?the?compiler?and
?????*?retained?by?the?VM?at?run?time,?so?they?may?be?read?reflectively.
?????*
?????*?@see?java.lang.reflect.AnnotatedElement
?????*/
????RUNTIME
}
????/**
?????*?Annotations?are?to?be?discarded?by?the?compiler.
?????*/
????SOURCE,
????/**
?????*?Annotations?are?to?be?recorded?in?the?class?file?by?the?compiler
?????*?but?need?not?be?retained?by?the?VM?at?run?time.??This?is?the?default
?????*?behavior.
?????*/
????CLASS,
????/**
?????*?Annotations?are?to?be?recorded?in?the?class?file?by?the?compiler?and
?????*?retained?by?the?VM?at?run?time,?so?they?may?be?read?reflectively.
?????*
?????*?@see?java.lang.reflect.AnnotatedElement
?????*/
????RUNTIME
}