嗨,我有以下 java 代码,
public class A{
private String B="test_string";
private int AA;
public int C;
private int method1()
{
int a;
a=0;
return a;
}
private int method1(int c, String d)
{
int a;
a=c;
return a;
}
}
但是当我使用 javap -c 命令来获取等效的字节码时,
Compiled from "A.java"
public class A extends java.lang.Object{
public int C;
public A();
Code:
0: aload_0
1: invokespecial #1; //Method java/lang/Object."<init>":()V
4: aload_0
5: ldc #2; //String test_string
7: putfield #3; //Field B:Ljava/lang/String;
10: return
}
这里的字节码我不清楚,因为私有变量和方法声明在哪里?
谁能给我解释一下?