Please provide a complete and functional Java code to solve this problem with comments.
Write a Java method that repeatedly selects and removes a random entry from an array until the array holds no more entries.
The response must be typed, single spaced, must be in times new roman font (size 12) and must follow the APA format.