Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    public static <K> K getGenericList(List<K> result) {
        if (result == null || result.isEmpty()) {
            return null;
        } else {
            return result.stream().findAny().get();
        }
    }
}