I NEED IT NOW PLZ , IT IS URGENT
Posted: Tue May 24, 2022 8:00 am
I NEED IT NOW PLZ , IT IS URGENT
Part I: multiple-choice questions (1.5 points * 30) 1. Which of the following statements is true about interfaces? ( ) A. You can define non-abstract methods in an interface B. Variables can be defined in the interface C. The methods defined in the interface are static, public, abstract D. Interface is not a class, but a set of requirements for classes 2. In Java, what are the access rights that can only be accessed by methods of subclasses or classes in the same package? ( ) A. Public B. Private C. Protected D. Packaged 3. When is the constructor being called to? ( ) A. When designing a class B. When creating an object C. When calling the object method D. When defining a class 4. Which of the following is incorrect about overloading? ( ) A. Must be in the same class B. Same method name C. The return value can be different D. The parameter list is same 5. Which of the following statements about package is wrong? ( ) A. Only one import statement exists in one java file B. Use the package keyword to specify the packages to which the class belongs C. A java package is a group of similar types of classes, interfaces and sub- packages D. Import package requires the keyword import 6. There is a class Car, which statement about its constructor is correct? ( ) A. void Car (double x){...} B. Car (double x){...} C. car( double x){...} D. void car( double x){...}
Part I: multiple-choice questions (1.5 points * 30) 1. Which of the following statements is true about interfaces? ( ) A. You can define non-abstract methods in an interface B. Variables can be defined in the interface C. The methods defined in the interface are static, public, abstract D. Interface is not a class, but a set of requirements for classes 2. In Java, what are the access rights that can only be accessed by methods of subclasses or classes in the same package? ( ) A. Public B. Private C. Protected D. Packaged 3. When is the constructor being called to? ( ) A. When designing a class B. When creating an object C. When calling the object method D. When defining a class 4. Which of the following is incorrect about overloading? ( ) A. Must be in the same class B. Same method name C. The return value can be different D. The parameter list is same 5. Which of the following statements about package is wrong? ( ) A. Only one import statement exists in one java file B. Use the package keyword to specify the packages to which the class belongs C. A java package is a group of similar types of classes, interfaces and sub- packages D. Import package requires the keyword import 6. There is a class Car, which statement about its constructor is correct? ( ) A. void Car (double x){...} B. Car (double x){...} C. car( double x){...} D. void car( double x){...}