1) What keyword is used to allow a class to inherit from another class? a) implements b) extends c) inherits d) super 2) Which access modifier makes a method or variable accessible only within its own class? a) public b) protected c) private d) default 3) What is the term for the ability of an object to take on many forms (e.g., a superclass reference holding a subclass object)? a) Inheritance b) Encapsulation c) Polymorphism d) Abstraction 4) A class that is declared with the abstract keyword: a) Can be instantiated directly. b) Cannot be instantiated directly. c) Can only have abstract methods. d) Cannot have a constructor. 5) What keyword is used for a class to use an interface? a) extends b) uses c) realizes d) implements 6) When a subclass provides a specific implementation for a method that is already defined in its superclass, it is called: a) Method Overloading b) Method Overriding c) Method Hiding d) Method Abstracting 7) Can a single class in Java extend more than one class (multiple inheritance)? a) Yes b) No 8) Can a single class in Java implements more than one interface? a) Yes b) No 9) Which modifier makes a member accessible to its package and all its subclasses (even in other packages)? a) public b) protected c) private d) default (package-private) 10) An interface can contain: a) Only abstract methods. b) Only concrete methods. c) Abstract methods, default methods, and static methods. d) Only constructors. 11) What is the main purpose of an abstract class? a) To be instantiated many times. b) To serve as a base class (superclass) for other classes to extend. c) To hide all data. d) To replace interfaces. 12) The default access modifier (when no modifier is written) means the member is accessible: a) Only within the same class. b) Only within the same package. c) Everywhere in the project. d) Only to subclasses.
0%
Answer the multiple-choice questions about Java Object-Oriented Programming concepts
공유
공유
공유
만든이
Joaobittencourt
Ensino técnico
Ensino superior
Dados e programação
콘텐츠 편집
인쇄
퍼가기
더보기
할당
순위표
더 보기
접기
이 순위표는 현재 비공개입니다.
공유
를 클릭하여 공개할 수 있습니다.
자료 소유자가 이 순위표를 비활성화했습니다.
옵션이 자료 소유자와 다르기 때문에 이 순위표가 비활성화됩니다.
옵션 되돌리기
퀴즈
(은)는 개방형 템플릿입니다. 순위표에 올라가는 점수를 산출하지 않습니다.
로그인이 필요합니다
비주얼 스타일
글꼴
구독 필요
옵션
템플릿 전환하기
모두 표시
액티비티를 플레이할 때 더 많은 포맷이 나타납니다.
결과 열기
링크 복사
QR 코드
삭제
자동 저장된
게임을 복구할까요?