foo.class java文件中的指令数

我有一个java程序的二进制文件说foo.class.我可以计算该类文件中的指令数吗?或者我必须有源代码来计算指令数量.

最佳答案
只需disassemble使用javap的类.-c选项

…prints out disassembled code,i.e.,the instructions that comprise the
Java bytecodes,for each of the methods in the class. These are
documented in the Java Virtual Machine Specification

相关文章

Java中的String是不可变对象 在面向对象及函数编程语言中,不...
String, StringBuffer 和 StringBuilder 可变性 String不可变...
序列化:把对象转换为字节序列的过程称为对象的序列化. 反序...
先说结论,是对象!可以继续往下看 数组是不是对象 什么是对...
为什么浮点数 float 或 double 运算的时候会有精度丢失的风险...
面试题引入 这里引申出一个经典问题,看下面代码 Integer a ...