我A在类中有一个方法Test,它生成一个数字a,b下面是它的代码:
public class Test
{
int a,b;
public void A()
{
a = currentMenu.getCurrentFocusedItem().getItemID();
b = currentMenu.getMenuID();
System.out.println("Inside A ()" + a + " &&" + b);
}
public void B()
{
System.out.println("Inside B ()" + a + " &&" + b);
}
}
现在,我想在同一个
类文件中将a和b int值访问到另一个方法中。需要一些指针 B()