📜  从另一个类 java 代码示例访问字符串

📅  最后修改于: 2022-03-11 14:52:27.883000             🧑  作者: Mango

代码示例1
class A {
int a = 10;
}
public class B{
public static void main (String args[]){
A a = new A();
System.out.println("I live in A " + a.a);
}