一直想成为一名优秀的架构师的我,转眼已经工作快两年了,对于java内核了解甚少,闲来时间,看看JVM,吧自己的一些研究写下来供大家参考,有不对的地方请指正。

废话不多说,一起来看看JVM中类文件是如何加载和运行的。

(1)首先,编写简单代码,对其编译生成的class文件进行研究,其java代码如下:

 1 public class test {
 2     private static int count = 0;
 3     public static void recursion(){
 4         count++;
 5         recursion();
 6     }
 7 
 8     public  static  void  main (String args[]){
 9         try {
10             recursion();
11         }catch (Exception ex){
12             System.out.print("deep of callings:"+count+"\n");
13             ex.printStackTrace();
14         }
15     }
16 }
View Code

相关文章:

  • 2021-07-17
  • 2021-09-30
  • 2021-09-21
  • 2021-04-28
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
猜你喜欢
  • 2021-11-07
  • 2022-02-02
  • 2021-04-17
  • 2021-07-08
  • 2022-12-23
  • 2021-11-08
相关资源
相似解决方案