Java中对象的调用@造型专家_day_07_20210330
先放个代码
public class A{
int i;
public static void main (String [] args){
A a = new A();
a.m1();
a.m1(a);
System.out.println( a.i );
}
public void m1(){
A a = new A();
a.i = 1;
a.i *= 100;
System.out.println( a.i );
}
pu
原创
2021-03-30 19:21:39 ·
64 阅读 ·
0 评论