[Java daily question] 20170117, java20170117
20170116 for problem resolution, click "Java daily question" 20170117 "below today's question to view the problem (The problem is resolved at the beginning of the public account, public ID: weknow619)
Package Jan2017; import java. util. arrayList; import java. util. collections; import java. util. list; public class Ques0117 {public static void main (String [] args) {List list = Ques0117.asList (1, 2, 3.0 );} public static <T> List <T> asList (T... t) {List <T> list = new ArrayList <T> (); Collections. addAll (list, t); return list ;}}
Today's question:
Can the main program be compiled normally? Is list generic parameters the Number of the parent class of Integer and Float? (Click "[Java daily question] 20170117" below to view issue resolution 20170116)
Questions originally published on the public account and short book: [Java daily question] 20170117, [Java daily question] 20170117 (you can also scan the Avatar QR code to view)
The weknow team has activated the authentication and has answered questions. If you have any questions, you can also consult. Click the answer to find me !!