下列类的定义,错误的是
A: public class test extends Object{…… }
B: final class operators{……}
C: class Point{…… }
D: void class Point{…… }
A: public class test extends Object{…… }
B: final class operators{……}
C: class Point{…… }
D: void class Point{…… }
举一反三
- (6-1)下列错误的类定义是() A: public class test extends Object{ ... } B: final class operators{ ... } C: class Point{ ... } D: void class Point{ }
- 下列哪些是合法的类定义语句 A: public class A {} B: class A extends Exception,I0Exception {} C: public class 1A extends Object D: public class String {}
- 下列各种java类的定义,那种是错误的 A: class Animal{}class Dog extends Animal {} B: final class Animal{}class Dog extends Animal{} C: abstract class Animal{}class Dog extends Animal{} D: public class Animal{}class Dog extends Animal{}
- 下面代码中,没有定义内部类或者错误定义了内部类的是()。 A: public Class Line { int length; Class Point {//内部类代码}} B: public Class Line { public Point getPoint() { return new Point(){//内部类代码}; }} C: public Class Line { //外部类代码} Class Point {//内部类代码} D: public Class Line { public int calcLength() { Class Point {//内部类代码} }}
- 下列关于Test类的定义代码中,正确的是______。 A: class Test implements Runnable { public void run() {} public void someMethod() {} } B: class Test implements Runnable { public void run(); } C: class Test implements Runnable { public void someMethod(); } D: class Test implements Runnable { public void someMethod() {} }