Answer and Explanation:
Static variables are variables that still maintain their values outside the score which they are declared. They are declared with the static keyword
Example:
<em>static int score = 30;</em>
Local variables are variables whose scope are restricted to a block. Their values are restricted to the block which they are declared in.
Example:
<em>void abd(){</em>
<em>int score;</em>
<em>}</em>
<em>score is a local variable to abcd() function</em>
Answer:
The answer to this question is given below in the explanation section.
Explanation:
When you use an array in the program, it occupies the memory where to store the data. However, it is noted that the other array cannot store the variable value where the first array has to store its variable value.
however, when you reassign the value their index position of the array, the values are reassigned. But it also depends on the CPU, because sometimes when you release the memory from the array, maybe some other programs get to occupy that location where the first array values were stored.
However, In Java, it is possible that the same int/integer comes at the same spot of the existing integer in an array, then the value at that particular index is reassigned.
Answer:
The answer is "option iii" .
Explanation:
In the given question it is defined that a class "Rectangle" is defined in the class a parameter constructor is created that accepts two parameters. In this question, we create an instance of the class. In object creation first, we define class name then object name and use new keyword in the Instance of class and pass parameters.
- In option i), An object name is used first and then class name. It is not correct.
- In option ii), In instance creation of the class, we do not use class keyword that's why it is wrong.
List the poem please. I won’t be able to answer without it.
Increase the font size and make the headline bold