如下代碼定義了一個類Test:class Test {private int y;Test (int x) { y:x; }}現(xiàn)在為Test 類生成
如下代碼定義了一個類Test: class Test { private int y; Test (int x) { y:x; } }現(xiàn)在為Test 類生成一個對象,正確的語句是()。
A.Test t = new Test();
B.Test t=new Test(10, 20);
C.Test t;
D.Test t=new Test(10);