分析java的堆栈信息 内存模型
package com.test.learnJava; public class LineNum { public static void main(String[] args) { System.out.println("123"); int ij = 0; String s = "ij="; for (; ; ) { JavaLine javaLine = new JavaLine(); javaLine.P(s + ij); ij++; try { Thread.sleep(1000); } catch (Exception e) { e.printStackTrace(); } } } } class JavaLine { public static void P(String s) { System.out.println(s); } }