package com.model.jvm; public class Thread01 { public static void main(String[] args) { //java.lang.IllegalThreadStateException , 不合法线程的状态异常 Thread thread=new Thread(); thread.start(); thread.start(); } }
(Error)栈内存溢出异常(SOF):Exception in thread "main" java.lang.StackOverflowError
package com.model.jvm; public class JvmNote { public static void m1(){ System.out.println("2222222222222"); System.out.println("*******m1******"); m1(); System.out.println("333333333333"); } public static void main(String[] args) { System.out.println("11111111111"); m1(); System.out.println("4444444444"); } }
原文:https://www.cnblogs.com/zzhAylm/p/14852970.html