test3.3

来源:互联网 发布:热模拟软件 编辑:程序博客网 时间:2024/06/02 03:11
/*target:try the alias name mechanism
 * methods:use float class
 */
class Letter
{float c;}
public class Test3 {
public static void main(String[] args) {
Letter x=new Letter();
x.c=12.36f;
System.out.println("x.c= "+x.c);
f(x);
System.out.println("x.c= "+x.c);
}
static void f(Letter y)
{y.c=3.21f;}
}
0 0