Multiple Choice
Consider the classes below:
Public class TestA
{
Public static void main(String args[])
{
Int x = 2;
Int y = 20
Int counter = 0;
For (int j = y % x;j < 100;j += (y / x) )
Counter++;
}
}
Public class TestB
{
Public static void main(String args[])
{
Int counter = 0;
For (int j = 10;j > 0;--j)
++counter;
}
}
Which of the following statements is true?
A) The value of counter will be different at the end of each for loop for each class.
B) The value of j will be the same for each loop for all iterations
C) Both (a) and (b) are true.
D) Neither (a) nor (b) is true.
Correct Answer:

Verified
Correct Answer:
Verified
Q1: Which of the following will not help
Q5: Suppose variable gender contains MALE and age
Q8: The first statement in every paintComponent method
Q8: Which of the following can be used
Q9: Which of the following is equivalent to
Q10: Which of the following statements about a
Q11: Which of the following is not a
Q16: Which of the following statements about the
Q25: Boolean values can be displayed as the
Q26: Which of the following will count down