考虑一个带有许多变量的 java 程序,其中一些是循环计数器
为什么 ?我认为它可以帮助我轻松调试。
Example-
int a = 7;
for(i=0; i<3; i++)
{
a++;
}
当这个程序运行时,我想得到这样的实时报告:
t is 0, a is 7, i is 0
t is 3, a is 8, i is 1
t is 12, a is 9, i is 2
(t is time, time factor is NOT necessary though)