Answer:
The correct answer to the following question will be 2. the operator new.
Explanation:
New operator is used to allocating the memory to the instance object.The new object can be created by using a "new" keyword in java .
Syntax of using 'new' operator is :
class_name object_name=new class_name() // it allocated the memory to the class
For Example :
ABC obj = new ABC;
Now, this time obj points to the object of the ABC class.
obj = new ABC ();
call the construction of ABC class
Answer:
True.
Explanation:
For all the count values, if Ranfun() returns true then all the values of count would be printed. Then the sequence of count values printed would be 1 2 3 4 5. Also for all the values of count if Ranfun() returns false then all the values would be enqueued. When we try to dequeue elements from queue we would get them in the same order of their entry into the queue. Thus, the sequence would be 1 2 3 4 5. Hence, we can say that this output sequence is possible. TRUE.
5
“var x = 5” declares a variable (var) called x and sets its value to 5.
<h2>Only when the default parameter are defined in the function</h2>
Explanation:
Answer is same for both the question.
- A default argument or default parameter is assigned an automatic value when the function is invoked.
- So the default value will be assigned during the function definition itself.
- You can find the assignment operator which is being used in the function definition.
- You can overwrite the default values by passing your own value in the calling portion
- The constraint here is that, the default parameter should always be the last parameter of function definition to avoid ambiguity.