看一道简单的JAVA试题,答案是什么?
在如下源代码文件Test.java中,哪个是正确的类定义?
A. public class test
{
public int x = 0;
public test(int x)
{this.x = x; }
}
B. public class Test
{
public int x=0;
public Test(int x)
{
this.x = x;
}
}
C. public class Test extends T1, T2
{
public int x = 0;
public Test(int x)
{
this.x = x;
}
}
D. public class Test extends T1
{
public int x=0;
public Test(int x)
{