默認值賦給一個局部變量我想聲明局部變量,如: DECLARE @thresholdDate DATETIME = '2014-11-30'
而且我得到錯誤: Cannot assign a default value to a local variable. 按documentation: DECLARE @find varchar(30);
/* Also allowed:
DECLAR
下面的代碼給我一個錯誤The blank final field a may not have been initialized。 public class Test {
public static final int a;
public static void main(String[] args) {
}
}
爲什麼不能常量保持一個整數的默認值?