Answer:
public static int powOfTwo(int input) {
return input*input;
}
You will have to call this method in main
for printing it, write
System.out.println(powOfTwo(your number));
in public static void main(str[]args) {
}
Answer:
The sonar operator looks at the display a forms an internal representation of the strength of the evidence that a submarine is present. If this exceeds an internal, subjective threshold,the sonar operator tells the captain that a submarine is present.
Explanation:
Let, DG is the datagram so, DG= 2400.
Let, FV is the Value of Fragment and F is the Flag and FO is the Fragmentation Offset.
Let, M is the MTU so, M=700.
Let, IP is the IP header so, IP= 20.
Let, id is the identification number so, id=422
Required numbers of the fragment = ![[\frac{DG-IP}{M-IP} ]](https://tex.z-dn.net/?f=%5B%5Cfrac%7BDG-IP%7D%7BM-IP%7D%20%5D)
Insert values in the formula = ![[\frac{2400-20}{700-20} ]](https://tex.z-dn.net/?f=%5B%5Cfrac%7B2400-20%7D%7B700-20%7D%20%5D)
Then, =
= ![[3.5]](https://tex.z-dn.net/?f=%5B3.5%5D)
The generated numbers of the fragment is 4
- If FV = 1 then, bytes in data field of DG=
and id=422 and FO=0 and F=1.
- If FV = 2 then, bytes in data field of DG=
and id=422 and FO=85
and F=1.
- If FV = 3 then, bytes in data field of DG=
and id=422 and FO=170
and F=1.
- If FV = 4 then, bytes in data field of DG=
and id=422 and FO=255
and F=0.
Answer:
All
Explanation:
From the available options given in the question, once the while loop terminates any of the provided answers could be correct. This is because the arguments passed to the while loop indicate two different argument which both have to be true in order for the loop to continue. All of the provided options have either one or both of the arguments as false which would break the while loop. Even options a. and b. are included because both would indicate a false statement.