Deck 9: Advanced Java Topics

ملء الشاشة (f)
exit full mode
سؤال
Containment is another name for a(n)______ relationship.

A)is-a
B)has-a
C)has-many
D)similar-to
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The class which inherits the members of another class is known as the ______.

A)superclass
B)derived class
C)base class
D)abstract class
سؤال
A subclass inherits all of the following members of its superclass EXCEPT ______.

A)public methods
B)data fields
C)constructors
D)protected methods
سؤال
Inheritance should only be used when a(n)______ relationship exists between the superclass and the subclass.

A)is-a
B)has-a
C)has-many
D)similar-to
سؤال
The ______ access modifier hides the members of a class from the class's clients but makes them available to a subclass and to another class within the same package.

A)public
B)protected
C)private
D)package access
سؤال
______ enables the reuse of existing classes.

A)Encapsulation
B)Inheritance
C)Polymorphism
D)Simulation
سؤال
______ is the ability of a class to derive properties from a previously defined class.

A)Encapsulation
B)Simulation
C)Inheritance
D)Polymorphism
سؤال
A class's ______ members can only be used by its own methods.

A)public
B)protected
C)private
D)package access
سؤال
A class's ______ members are available to instances of all classes.

A)public
B)protected
C)private
D)package access
سؤال
The keyword ______ is used in the class declaration of a subclass to indicate its superclass.

A)inherits
B)extends
C)implements
D)super
سؤال
Dynamic binding is also known as ______.

A)early binding
B)late binding
C)package binding
D)inheritance binding
سؤال
A method in a subclass is said to ______ an inherited method if it has the same method declarations as the inherited method.

A)copy
B)override
C)overload
D)cancel
سؤال
Java packages provide a way to group related ______ together.

A)objects
B)data structures
C)variables
D)classes
سؤال
In a class within a package,the keyword ______ must appear in front of the class keyword to make the class available to clients of the package.

A)open
B)public
C)protected
D)package
سؤال
A superclass method can be accessed by a subclass,even though it has been overridden by the subclass,by using the ______ reference.

A)super
B)final
C)static
D)new
سؤال
The class from which another class is derived is known as the ______.

A)base class
B)subclass
C)child class
D)final class
سؤال
Which of the following is NOT true about packages?

A)a package can contain other packages
B)a package's name must be the same as the directory that contains all of the classes in the package
C)a Java source file that is part of a named package must contain a statement at the top of the file that contains the keyword package and the name of the package
D)all classes in a package are available to clients of the package
سؤال
A subclass is said to be a ______ of its superclass.

A)descendant
B)relative
C)leaf
D)mirror
سؤال
The constructor of a subclass can call the constructor of the superclass by using the ______ reference.

A)extends
B)new
C)super
D)import
سؤال
In general,a class's data fields should be declared as ______.

A)public
B)protected
C)private
D)package access
سؤال
A package cannot contain other packages.
سؤال
An instance of a subclass can access the protected members of the superclass.
سؤال
A subclass can contain its own version of an inherited method.
سؤال
A base class is a class that inherits the members of another class.
سؤال
Methods declared as ______ use static binding.

A)protected
B)final
C)public
D)abstract
سؤال
Inheritance should not be used to implement a has-a relationship.
سؤال
A subclass that fails to implement all of the abstract methods of its superclass must be declared as a(n)______ class.

A)abstract
B)static
C)final
D)private
سؤال
Which of the following is true about an abstract class?

A)it can be instantiated
B)it can contain zero or more abstract methods
C)it cannot be inherited by other classes
D)it cannot contain data fields
سؤال
A(n)______ is a class that is used to provide access to another class that contains many objects.

A)interface
B)abstract class
C)package
D)iterator
سؤال
An instance of a superclass can be used anywhere an instance of its subclass is expected.
سؤال
A method that has the same name but a different set of parameters as an existing method is said to ______ the original method.

A)bind
B)cancel
C)override
D)overload
سؤال
A package and the directory that contains all the classes in the package must have the same name.
سؤال
A subclass cannot add new members to those it inherits from the superclass.
سؤال
If the field modifier ______ is specified in a method definition,the method cannot be overridden by a subclass.

A)public
B)protected
C)final
D)abstract
سؤال
A superclass's private data fields can be revised by one of its subclasses.
سؤال
A Java ______ specifies behaviors that are common to a group of classes.

A)package
B)final class
C)interface
D)subclass
سؤال
If a method definition in a superclass has the field modifier ______,a subclass is required to override the method.

A)static
B)protected
C)final
D)abstract
سؤال
______ is the ability of a variable name to represent,during program execution,instances of different but related classes that descend from a common superclass.

A)Inheritance
B)Containment
C)Polymorphism
D)Encapsulation
سؤال
Static binding is also known as ______.

A)early binding
B)late binding
C)package binding
D)inheritance binding
سؤال
Clients of a class can directly access the protected members of that class.
سؤال
What is method overloading?
سؤال
What are some of the advantages of using an object-oriented approach to the development of a software?
سؤال
What is an access modifier?
سؤال
What kind of relationship exists between a superclass and a subclass?
سؤال
What are the two basic kinds of relationships among classes?
سؤال
What is an advantage to defining an ADT that uses a generic data type?
سؤال
How can a package be created in Java?
سؤال
Name 3 important operations that an iterator object can perform.
سؤال
When is a method in a subclass said to override a method in the superclass?
سؤال
What is meant by object type compatibility?
سؤال
Is it legal for a subclass of an abstract class not to implement all of the methods it inherits? Briefly explain.
سؤال
What is containment?
سؤال
What is meant by static binding?
سؤال
What is meant by dynamic binding?
سؤال
Name two things that an abstract class may include that an interface would not.
سؤال
Can the object type of an argument in the call to a method be difference from the object type of the corresponding formal parameter? Explain.
سؤال
What is an abstract class?
سؤال
What does the reference super represent?
سؤال
What is a subinterface?
سؤال
What kind of methods are appropriate to implement in an abstract class?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/60
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 9: Advanced Java Topics
1
Containment is another name for a(n)______ relationship.

A)is-a
B)has-a
C)has-many
D)similar-to
B
2
The class which inherits the members of another class is known as the ______.

A)superclass
B)derived class
C)base class
D)abstract class
B
3
A subclass inherits all of the following members of its superclass EXCEPT ______.

A)public methods
B)data fields
C)constructors
D)protected methods
C
4
Inheritance should only be used when a(n)______ relationship exists between the superclass and the subclass.

A)is-a
B)has-a
C)has-many
D)similar-to
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
5
The ______ access modifier hides the members of a class from the class's clients but makes them available to a subclass and to another class within the same package.

A)public
B)protected
C)private
D)package access
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
6
______ enables the reuse of existing classes.

A)Encapsulation
B)Inheritance
C)Polymorphism
D)Simulation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
7
______ is the ability of a class to derive properties from a previously defined class.

A)Encapsulation
B)Simulation
C)Inheritance
D)Polymorphism
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
8
A class's ______ members can only be used by its own methods.

A)public
B)protected
C)private
D)package access
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
9
A class's ______ members are available to instances of all classes.

A)public
B)protected
C)private
D)package access
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
10
The keyword ______ is used in the class declaration of a subclass to indicate its superclass.

A)inherits
B)extends
C)implements
D)super
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
11
Dynamic binding is also known as ______.

A)early binding
B)late binding
C)package binding
D)inheritance binding
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
12
A method in a subclass is said to ______ an inherited method if it has the same method declarations as the inherited method.

A)copy
B)override
C)overload
D)cancel
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
13
Java packages provide a way to group related ______ together.

A)objects
B)data structures
C)variables
D)classes
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
14
In a class within a package,the keyword ______ must appear in front of the class keyword to make the class available to clients of the package.

A)open
B)public
C)protected
D)package
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
15
A superclass method can be accessed by a subclass,even though it has been overridden by the subclass,by using the ______ reference.

A)super
B)final
C)static
D)new
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
16
The class from which another class is derived is known as the ______.

A)base class
B)subclass
C)child class
D)final class
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
17
Which of the following is NOT true about packages?

A)a package can contain other packages
B)a package's name must be the same as the directory that contains all of the classes in the package
C)a Java source file that is part of a named package must contain a statement at the top of the file that contains the keyword package and the name of the package
D)all classes in a package are available to clients of the package
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
18
A subclass is said to be a ______ of its superclass.

A)descendant
B)relative
C)leaf
D)mirror
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
19
The constructor of a subclass can call the constructor of the superclass by using the ______ reference.

A)extends
B)new
C)super
D)import
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
20
In general,a class's data fields should be declared as ______.

A)public
B)protected
C)private
D)package access
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
21
A package cannot contain other packages.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
22
An instance of a subclass can access the protected members of the superclass.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
23
A subclass can contain its own version of an inherited method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
24
A base class is a class that inherits the members of another class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
25
Methods declared as ______ use static binding.

A)protected
B)final
C)public
D)abstract
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
26
Inheritance should not be used to implement a has-a relationship.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
27
A subclass that fails to implement all of the abstract methods of its superclass must be declared as a(n)______ class.

A)abstract
B)static
C)final
D)private
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
28
Which of the following is true about an abstract class?

A)it can be instantiated
B)it can contain zero or more abstract methods
C)it cannot be inherited by other classes
D)it cannot contain data fields
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
29
A(n)______ is a class that is used to provide access to another class that contains many objects.

A)interface
B)abstract class
C)package
D)iterator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
30
An instance of a superclass can be used anywhere an instance of its subclass is expected.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
31
A method that has the same name but a different set of parameters as an existing method is said to ______ the original method.

A)bind
B)cancel
C)override
D)overload
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
32
A package and the directory that contains all the classes in the package must have the same name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
33
A subclass cannot add new members to those it inherits from the superclass.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
34
If the field modifier ______ is specified in a method definition,the method cannot be overridden by a subclass.

A)public
B)protected
C)final
D)abstract
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
35
A superclass's private data fields can be revised by one of its subclasses.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
36
A Java ______ specifies behaviors that are common to a group of classes.

A)package
B)final class
C)interface
D)subclass
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
37
If a method definition in a superclass has the field modifier ______,a subclass is required to override the method.

A)static
B)protected
C)final
D)abstract
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
38
______ is the ability of a variable name to represent,during program execution,instances of different but related classes that descend from a common superclass.

A)Inheritance
B)Containment
C)Polymorphism
D)Encapsulation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
39
Static binding is also known as ______.

A)early binding
B)late binding
C)package binding
D)inheritance binding
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
40
Clients of a class can directly access the protected members of that class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
41
What is method overloading?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
42
What are some of the advantages of using an object-oriented approach to the development of a software?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
43
What is an access modifier?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
44
What kind of relationship exists between a superclass and a subclass?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
45
What are the two basic kinds of relationships among classes?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
46
What is an advantage to defining an ADT that uses a generic data type?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
47
How can a package be created in Java?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
48
Name 3 important operations that an iterator object can perform.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
49
When is a method in a subclass said to override a method in the superclass?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
50
What is meant by object type compatibility?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
51
Is it legal for a subclass of an abstract class not to implement all of the methods it inherits? Briefly explain.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
52
What is containment?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
53
What is meant by static binding?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
54
What is meant by dynamic binding?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
55
Name two things that an abstract class may include that an interface would not.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
56
Can the object type of an argument in the call to a method be difference from the object type of the corresponding formal parameter? Explain.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
57
What is an abstract class?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
58
What does the reference super represent?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
59
What is a subinterface?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
60
What kind of methods are appropriate to implement in an abstract class?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 60 في هذه المجموعة.