jvm参数调试demo Posted on 2021-02-13 12345678910111213141516171819202122232425/** * @author devin * @version 1.0.2 * @date 2021-01-13 20:48 */public class Demo2 { private static final int _512KB = 512 * 1024; private static final int _1MB = 1024 * 1024; private static final int _6MB = 6 * 1024 * 1024; private static final int _7MB = 7 * 1024 * 1024; private static final int _8MB = 8 * 1024 * 1024; // -Xms20M -Xmx20M -Xmn10M -XX:+UseSerialGC -XX:+PrintGCDetails -verbose:gc public static void main(String[] args) throws InterruptedException { BlockingQueue<Integer> queue = new ArrayBlockingQueue<>(3); queue.add(2); queue.add(3); queue.add(5); queue.put(3); System.out.println(queue.take()); }} Donate comment here Donate WeChat Pay