Deck 10: Java Programming Language: Inheritance, Interfaces, Packages, and Methods
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/18
العب
ملء الشاشة (f)
Deck 10: Java Programming Language: Inheritance, Interfaces, Packages, and Methods
1
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 {}
class B extends A {}
2
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.
Variables declared in interfaces are implicitly public, static, and final.
3
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.
class Manager implements salary {}
4
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
5
Which exception is thrown by read() method?
A)IOException
B)InterruptedException
C)SystemException
D)SystemInputException
A)IOException
B)InterruptedException
C)SystemException
D)SystemInputException
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
6
Which method in Thread class is used to check weather a thread is still running?
A)isAlive()
B)Join()
C)isRunning()
D)Alive()
A)isAlive()
B)Join()
C)isRunning()
D)Alive()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which of these class contains the methods print() & println()?
A)System
B)System.out
C)BufferedOutputStream
D)PrintStream
A)System
B)System.out
C)BufferedOutputStream
D)PrintStream
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
8
To design a general-purpose search method, searchList, to search a list, which of the following must be parameters of the method searchList?
(i) The array containing the list.
(ii) The length of the list.
(iii) The search item.
(iv) A boolean variable indicating whether the search is successful.
A)(i) and (ii)
B)(i), (ii), and (iii)
C)(ii), (iii), and (iv)
D)(i), (ii), (iii), and (iv)
(i) The array containing the list.
(ii) The length of the list.
(iii) The search item.
(iv) A boolean variable indicating whether the search is successful.
A)(i) and (ii)
B)(i), (ii), and (iii)
C)(ii), (iii), and (iv)
D)(i), (ii), (iii), and (iv)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
9
In which package is the class Vector located?
A)java.io
B)java.lang
C)java.util
D)java.text
A)java.io
B)java.lang
C)java.util
D)java.text
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
10
For the interface WindowListener that contains more than one method, Java provides the class ____.
A)MouseAdapter
B)WindowAdapter
C)KeyListener
D)KeyAdapter
A)MouseAdapter
B)WindowAdapter
C)KeyListener
D)KeyAdapter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
11
Consider the following list. int[] intList = {35, 12, 27, 18, 45, 16, 38}; What is the minimum number of comparisons that have to be made to find 18 using a sequential search on intList?
A)1
B)2
C)3
D)4
A)1
B)2
C)3
D)4
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
12
Which of these packages contains all the classes and methods required for even handling in Java?
A)java.applet
B)java.awt
C)java.event
D)java.awt.event
A)java.applet
B)java.awt
C)java.event
D)java.awt.event
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
13
What is an event in delegation event model used by Java programming language?
A)An event is an object that describes a state change in a source.
B)An event is an object that describes a state change in processing.
C)An event is an object that describes any change by the user and system.
D)An event is a class used for defining object, to create events.
A)An event is an object that describes a state change in a source.
B)An event is an object that describes a state change in processing.
C)An event is an object that describes any change by the user and system.
D)An event is a class used for defining object, to create events.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
14
Which of these methods are used to register a keyboard event listener?
A)KeyListener()
B)addKistener()
C)addKeyListener()
D)eventKeyboardListener()
A)KeyListener()
B)addKistener()
C)addKeyListener()
D)eventKeyboardListener()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
15
Which of these methods are used to register a mouse motion listener?
A)addMouse()
B)addMouseListener()
C)addMouseMotionListner()
D)eventMouseMotionListener()
A)addMouse()
B)addMouseListener()
C)addMouseMotionListner()
D)eventMouseMotionListener()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
16
What is a listener in context to event handling?
A)A listener is a variable that is notified when an event occurs.
B)A listener is a object that is notified when an event occurs.
C)A listener is a method that is notified when an event occurs.
D)None of the mentioned
A)A listener is a variable that is notified when an event occurs.
B)A listener is a object that is notified when an event occurs.
C)A listener is a method that is notified when an event occurs.
D)None of the mentioned
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
17
Which command disassembles a class file
A)javaamd
B)javacmd
C)java
D)javap
A)javaamd
B)javacmd
C)java
D)javap
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck
18
Which of the following statements is false as far as different type of statements is concern in JDBC?
A)Regular Statement
B)Prepared Statement
C)Callable Statement
D)Interim Statement
A)Regular Statement
B)Prepared Statement
C)Callable Statement
D)Interim Statement
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 18 في هذه المجموعة.
فتح الحزمة
k this deck