Answer:
a. method body.
Explanation:
A method contains the following components:
- method implementation code
All of these together constitute the method body. The method body contains the declarations and statements constituting the method definition.
Apart from this, when the method is invoked at runtime, it needs to be called with method-name and the actual parameter list which gets substituted for the formal parameters in the method body.
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:
cubeVolume = IMath.toThePowerOf(cubeSide, 3);
Explanation:
Following is the explanation for above statement:
Left side:
cubeVolume is a variable with data-type int, it will store the integer value that is the output from right side.
Right side:
- IMath is the class name.
- toThePowerOf is the built-in function that takes two arguments of data type int. First is the base and second is the power(exponent) separated by comma. In place of first argument that is the base variable we will pass the variable cubeSide that has been declared and initialize.
- Now the output will be stored in the variable cubeVolume.
i hope it will help you!