Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.List;

public class Main {
    public static <E> E removeIfInBounds(final List<E> list, final int index) {
        return (list != null) && (index >= 0) && (index < list.size()) ? list.remove(index) : null;
    }
}