Deck 3: Java Programming: Data Types, Inheritance, Interfaces, Packages, and Exception Handling
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/25
العب
ملء الشاشة (f)
Deck 3: Java Programming: Data Types, Inheritance, Interfaces, Packages, and Exception Handling
1
A primitive data type can be passed as an argument into a method
A)By value
B)by reference
C)both a & b
D)none of these
A)By value
B)by reference
C)both a & b
D)none of these
By value
2
Which of these is used as default for a member of a class if no access specifier is used for it?
A)private
B)public
C)public, within its own package
D)protected
A)private
B)public
C)public, within its own package
D)protected
public, within its own package
3
Which of these keywords is used to refer to member of base class from a sub class?
A)upper
B)super
C)this
D)None of the mentioned
A)upper
B)super
C)this
D)None of the mentioned
super
4
Which of these is correct way of inheriting class A by class B?
A)class B + class A {}
B)class B inherits class A {}
C)class B extends A {}
D)class B extends class A {}
A)class B + class A {}
B)class B inherits class A {}
C)class B extends A {}
D)class B extends class A {}
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
5
Which of the following are true about interfaces.
A)Methods declared in interfaces are implicitly private.
B)Variables declared in interfaces are implicitly public, static, and final.
C)An interface contains any number of method definitions.
D)The keyword implements indicate that an interface inherits from another.
A)Methods declared in interfaces are implicitly private.
B)Variables declared in interfaces are implicitly public, static, and final.
C)An interface contains any number of method definitions.
D)The keyword implements indicate that an interface inherits from another.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
6
Which of these keywords is used to define interfaces in Java?
A)interface
B)Interface
C)intf
D)implements
A)interface
B)Interface
C)intf
D)implements
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which of these can be used to fully abstract a class from its implementation?
A)Objects
B)Packages
C)Interfaces
D)None of the Mentione
A)Objects
B)Packages
C)Interfaces
D)None of the Mentione
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
8
Which of these access specifiers can be used for an interface?
A)Public
B)Protected
C)private
D)All of the mentioned
A)Public
B)Protected
C)private
D)All of the mentioned
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
9
Which of these keywords is used by a class to use an interface defined previously?
A)import
B)Import
C)implements
D)Implements
A)import
B)Import
C)implements
D)Implements
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
10
Which of the following is correct way of implementing an interface salary by class manager?
A)class Manager extends salary {}
B)class Manager implements salary {}
C)class Manager imports salary {}
D)None of the mentioned
A)class Manager extends salary {}
B)class Manager implements salary {}
C)class Manager imports salary {}
D)None of the mentioned
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
11
The keyword used to create a package is
A)import
B)package
C)classpath
D)public
A)import
B)package
C)classpath
D)public
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
12
The modifier which specifies that the member can only be accessed in its own class is
A)public
B)private
C)protected
D)None of above
A)public
B)private
C)protected
D)None of above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
13
Which of the following package stores all the standard java classes?
A)lang
B)java
C)util
D)java.packages
A)lang
B)java
C)util
D)java.packages
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
14
Which of these is a mechanism for naming and visibility control of a class and its content?
A)Object
B)Packages
C)Interfaces
D)None of the Mentioned
A)Object
B)Packages
C)Interfaces
D)None of the Mentioned
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
15
Which of this access specifies can be used for a class so that its objects can be created by a different class in another package?
A)Public
B)Protected
C)No Modifier
D)All of the mentioned
A)Public
B)Protected
C)No Modifier
D)All of the mentioned
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
16
Which of the following is correct way of importing an entire package 'pkg'?
A)import pkg.
B)Import pkg.
C)import pkg.*
D)Import pkg.*
A)import pkg.
B)Import pkg.
C)import pkg.*
D)Import pkg.*
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
17
Which of the following is incorrect statement about packages?
A)Package defines a namespace in which classes are stored.
B)A package can contain other package within it.
C)Java uses file system directories to store packages.
D)A package can be renamed without renaming the directory in which the classes are stored.
A)Package defines a namespace in which classes are stored.
B)A package can contain other package within it.
C)Java uses file system directories to store packages.
D)A package can be renamed without renaming the directory in which the classes are stored.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
18
Which of these method of class String is used to extract a single character from a String object?
A)CHARAT()
B)chatat()
C)charAt()
D)ChatAt()
A)CHARAT()
B)chatat()
C)charAt()
D)ChatAt()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
19
Which of these method of class String is used to obtain length of String object?
A)get()
B)Sizeof()
C)lengthof()
D)length()
A)get()
B)Sizeof()
C)lengthof()
D)length()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
20
Which of these keywords is not a part of exception handling?
A)try
B)finally
C)thrown
D)catch
A)try
B)finally
C)thrown
D)catch
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
21
The code within the ----------- block will always be executed whether or not an exception is thrown.
A)try..catch
B)finally
C)throw
D)throws
A)try..catch
B)finally
C)throw
D)throws
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
22
Which of these keywords must be used to monitor for exceptions?
A)try..catch
B)finally
C)throw
D)throws
A)try..catch
B)finally
C)throw
D)throws
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
23
Which of these keywords is used to manually throw an exception?
A)try
B)finally
C)throw
D)catch
A)try
B)finally
C)throw
D)catch
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
24
Which of these classes is related to all the exceptions that can be caught by using catch?
A)Error
B)Exception
C)None of these
D)a & b
A)Error
B)Exception
C)None of these
D)a & b
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck
25
Which of these classes is related to all the exceptions that cannot be caught?
A)Error
B)Exception
C)None of these
D)a & b
A)Error
B)Exception
C)None of these
D)a & b
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 25 في هذه المجموعة.
فتح الحزمة
k this deck