Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.List;

public class Main {
    /**
     * Method removeAndReturn.
     * @param list List<E>
     * @param lookup E
     * @return E
     */
    public static <E> E removeAndReturn(List<E> list, E lookup) {
        return list.remove(list.indexOf(lookup));
    }
}