u****s 发帖数: 2186 | 1 public class T1 {
private int i;
public T1()
{
increment(i);
}
public void increment(int i)
{
i++;
}
public int getI()
{
return i;
}
}
class T2{
public void method(T1 t1)
{
if(t1 == null) t1 = new T1();
t1.increment(t1.getI());
}
public static void main( String [] args)
{
T1 t1 = null;
T1 [] t1s = new T1[]{ t1 };
T2 t2 = new T2();
for(int i=0;i
|
h*****0 发帖数: 4889 | 2 runtime error...
these kind of problems are so evil
【在 u****s 的大作中提到】 : public class T1 { : private int i; : public T1() : { : increment(i); : } : public void increment(int i) : { : i++; : }
|
u****s 发帖数: 2186 | 3 some of them are real questions asked in tests or interviews.
question 1. is to solve a SQLSever 2005 bug, it won't parse UTC dateformat
for non-English locale, the bug is fixed in SQLServer 2008.
【在 h*****0 的大作中提到】 : runtime error... : these kind of problems are so evil
|