package test; import java.util.*; import java.util.concurrent.SynchronousQueue; import java.util.concurrent.locks.Lock; import javax.print.attribute.IntegerSyntax; import org.omg.CosNaming.NamingContextExtPackage.AddressHelper; import privateclass.*; import java.io.*; import static java.util.Collections.sort;//静态导入 import static java.lang.System.out; public class Main { private static final String space_operator = " "; public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(new BufferedInputStream(System.in)); //PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); /* * 静态导入 */ List<Integer> list = new ArrayList<Integer>(); list.add(1); list.add(6); list.add(10); list.add(8); list.add(20); //静态导入java.util.Collections.sort方法 sort(list); //静态导入java.lang.System.out方法至于为什么不导入println因为他不是静态只能用类操作 out.println(list); } }