JavaDeploy
SiteMap
Java Certification
Java Beans
Java-OO Concepts
Threading Model
«Prev
Next»
Java Certification
Java Fundamentals
Source Files Compilation
Declare import Packages
Java main method
Identifiers Keywords
Primitive Types
Literal Values
Automatic Initialization
language-fundamentals-conclusion
Classes Objects
Object Oriented Programming
Class Interface Declarations
Subclasses Superclasses
Class Constructor Syntax
Types Of Nested Classes
Interface Use Declaration
Inner Class
Local Inner Classes
Anonymous Inner Class
Classes Objects - Conclusion
Anonymous Class - Quiz
Java Operators
Operator Summary
Logical Operators
Numeric Conversions
Casting Numeric Types
Java Casting - Quiz
Equality Testing
Assignment Operators
Order Of Evaluation.
Operator Conclusion
Declaring Java Methods
Declaring Variables
Exception Handling
Program Statements
Decision Making Code
for, while, do Loops
Java Break Statement
Throw Statement
try catch Block
Garbage Collection
Java Finalization
Java Statements Conclusion
Java Threading Model
Multithreading Theory
Starting Threads
Thread States
Ready to Running State
Waiting Dying Threads
Synchronized Shared Objects
Synchronization Concepts -Quiz
Waiting Notifying Threads
Preventing Thread Execution
Threading Model Conclusion
Multithreading and Thread Creation - Quiz
Each question is worth one point. Select the best answer or answers for each question.
1.
Which of the following are true about multithreading?
Please select all the correct answers.
A.
Multithreading is supported by Java.
B.
Multithreading can be supported by systems with one or more CPUs.
C.
Multithreading is only supported on systems with multiple CPUs.
D.
Multithreading is only supported on systems with a single CPU.
2.
In which ways may a thread be defined?
Please select all the correct answers.
A.
By extending the
Thread
class.
B.
By implementing the
Serializable
interface.
C.
By implementing the
Runnable
interface.
D.
By extending the
System
class.
3.
Which method is implemented by all threads?
Please select the best answer.
A.
init ()
B.
entry()
C.
execute()
D.
run()
4.
Which
Thread
method is invoked to cause a thread to execute as a separate execution sequence?
Please select the best answer.
A.
init()
B.
run()
C.
start()
D.
go()
5.
If a thread is defined by implementing the
Runnable
interface (and not extending the
Thread
class), what must be done to start the thread as a new execution sequence?
Please select the best answer.
A.
Invoke the thread's
run()
method.
B.
Create a
Thread
object using the thread and invoke the
Thread
object's
start()
method.
C.
Invoke the thread's
execute()
method.
D.
Create an instance of the thread using the
newThread()
method.