Quiz on Methods
Test your knowledge of methods in Java.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
What is the result when the following program is executed?
public class Main
{
static int getSum(int y, int z)
{
int mysum = y + z;
return mysum;
}
public static void main(String[] args)
{
getSum(5, 6);
}
}
A.
It gives no output.
B.
(5 + 6)
C.
11
D.
56
1 / 4
...