申論 2下列為資料結構List 的Java 程式,而ListTest 為測試類別(class),試回答以下問題:(35 分)⑴ListTest 中”List<Integer> list = new List<>();”會先後呼叫那些methods?傳送那些參數值?結果新物件list 的屬性值為何?⑵執行ListTest.java 後會列印出什麼?⑶撰寫public T removeFromBack() throws EmptyListException。class ListNode<T>{T data;ListNode<T> nextNode;ListNode(T object){this(object, null);}ListNode(T object, ListNode<T> node){data = object;nextNode = node;}T getData()ListNode<T> getNext()} // end class ListNode<T>public class List<T>{private ListNode<T> firstNode;private ListNode<T> lastNode;private String name;public List(){this("list");}public List(String listName){name = listName;firstNode = lastNode = null;}public void insertAtFront(T insertItem)public void insertAtBack(T insertItem)public T removeFromFront() throws EmptyListExceptionpublic T removeFromBack() throws EmptyListExceptionpublic boolean isEmpty()public void print(){if (isEmpty()){System.out.printf("Empty %s%n", name);return;}System.out.printf("The %s is: ", name);ListNode<T> current = firstNode;while (current != null){System.out.printf("%s ", current.data);current = current.nextNode;}System.out.println();}} // end class List<T>public class EmptyListException extends RuntimeException{public EmptyListException(){this("List");}public EmptyListException(String name){super(name + " is empty");}} // end class EmptyListExceptionpublic class ListTest{public static void main(String[] args){List<Integer> list = new List<>();try{list.insertAtFront(-1);list.insertAtFront(99);list.print();int removedItem = list.removeFromFront();removedItem = list.removeFromFront();list.print();removedItem = list.removeFromFront();list.print();}catch (EmptyListException emptyListException){emptyListException.printStackTrace();}}} // end class ListTest