use java code
1. Remove all target instances from a list. Design a method which takes ONE parameter: target, remove all instances of the target and return the new length. The order of elements can be changed. It doesn’t matter what you leave beyond the new length. Example 1: You
OR
OR