Company: Ubs__
Difficulty: medium
Collections in java Description Your task here is to implement a Java code based on the following specifications. Note that your code should match the specifications in a precise manner. Consider default visibility of classes, data fields and methods unless mentioned otherwise. You will be implementing methods inside a class named ArrayListOps . Task Your task is to implement the following methods: public ArrayList<Integer> convertArrayListtoInt(int n) This method should create an ArrayList of integers with a specified number of components, n , and set all components to 0 . Parameters: int n - The number of elements to be in the ArrayList. Return: An ArrayList<Integer> of size n with all elements initialized to 0. public ArrayList<Integer> reverse(ArrayList<Integer> list) This method should reverse the given ArrayList of integers. Parameters: ArrayList<Integer> list - The list to be reversed. Return: The reversed ArrayList<Integer> . Notes You don't