{
int a = 6;
System.out.print(a);
}
这里用{}包含起来, 会在}之后就释放掉a变量的内存。对优化java虚拟机性能有那么一点点的作用。
超出作用域就自动释放。
转载于:https://blog.51cto.com/leean/1662411
{
int a = 6;
System.out.print(a);
}
这里用{}包含起来, 会在}之后就释放掉a变量的内存。对优化java虚拟机性能有那么一点点的作用。
超出作用域就自动释放。
转载于:https://blog.51cto.com/leean/1662411