Java tutorial
//package com.java2s; /* * Copyright 2015-2020 Fengduo.com All right reserved. This software is the confidential and proprietary information of * Fengduo.com ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only * in accordance with the terms of the license agreement you entered into with Fengduo.com. */ import java.util.Collection; public class Main { public static <T extends Object> void addAll(Collection<T> target, Collection<T> source) { if (target != null && source != null && source.size() > 0) { target.addAll(source); } } }