正常
编译错误
运行错误
以上都不对
第1题:
使用jdbc 编写class EnrollmentImpl 实现接口 Enrollment:
public interface Enrollment{
public void createStudent(Student student) throws Exception;
pubic void createCourse(Course course) throws Exception;
public void enroll(Student student, Course course) throws Exception;
public void exam(Student, Course course, float grade) throws Exception;
}
第2题:
Which will declare a method that is available to all members of the same package and can be referenced without an instance of the class?()
第3题:
下列哪个选项不是InputStream类中的方法?
A.public abstract int read()throws IOException
B.public final void writeInt (int v)throws IOException
C.public void close()throws IOException
D.public int available() throws IOException
第4题:
interface Data { public void load(); } abstract class Info { public abstract void load(); } Which class correctly uses the Data interface and Info class?()
第5题:
public class TestA{ public void methodA() throws IOException{ //…… } } public class TestB extends TestA{ public void methodA() throws EOFException{ //…… } } public class TestC extends TestA{ public void methodA() throws Exception{ //…… } } 当编译类TestC的时候,结果是哪项?()
第6题:
public class SomeException { } Class a: public class a { public void doSomething() { } } Class b: public class b extends a { public void doSomething() throws SomeException { } } Which is true about the two classes?()
第7题:
Which will declare a method that is available to all members of the same package and be referenced without an instance of the class?()
第8题:
下列______选项不是InputStream类中的方法。
A.public abstract int read() throws IOException
B.public final void writeInt (int V)throws IOException
C.public int available() throws IOException
D.public void close() throws IOException
第9题:
Which two are valid declarations within an interface definition?()
第10题:
class TestA { public void start() { System.out.println(”TestA”); } } public class TestB extends TestA { public void start() { System.out.println(”TestB”); } public static void main(String[] args) { ((TestA)new TestB()).start(); } } What is the result?()