【发布时间】:2014-12-29 00:36:21
【问题描述】:
//object class
public class test
{
public test()
{
test t1 = new test();
}
}
//client class in same folder
public class Client
{
public static void main(String[] args)
{
test t = new test();
}
}
这只会产生无限的空测试对象吗? 随着越来越多的对象不断被创建,计算机内存空间/RAM 会发生什么变化?
【问题讨论】:
标签: object constructor client call instantiation