Exam


Which cannot directly cause a thread to stop executing?
A. Calling the SetPriority() method on a Thread object.
B. Calling the wait() method on an object.
C. Calling notify() method on an object.
D. Calling read() method on an InputStream object.
.View Answer

Leave a comment

Show Hide Test

Show Answer

Answer 1

Show Answer

Answer 2

Leave a comment

Sample

Show/Hide

View Answer
 
View Answer 2
 
View Answer 3

Leave a comment

What is Option Explicit and How to use it?

The Option Explicit statement forces the explicit declaration of all variables using the Dim, Private, Public, or ReDim statements.

This statement prevents the accidental reuse of the name of a previously declared variable. Also, if you mistype a declared variable's name or try to use an undeclared variable, an error message is generated.

Note that the Option Explicit statement must be placed at the top of the code before any other VBScript commands

Ex: Option Explicit
Dim a,b,c
a = 10
b = 20
c = a+b

VBScript ingeneral doesn't need variable declaration. For example without using "Dim" a variable can be directly used for assigning etc.
For ex: temp=1

However, such practise can always be error prone. Ex: if i want to use the same variable in someother statement and miss spell it,say
tempe=temp+1

Leave a comment