I have a test soon and are having troubles with the following questions..
6) A local variable is a:
(A) variable declared in a field (B) public statement of a variable in a method
(C) private statement of a variable (D) variable declared and used within a single method
9) Which of the following statements enables you to loop through the array “int X[5];”
(A) for(int i=0;i<5;i++) Y=X; (B) for int i=1;i<=5;i+=1) Y=X[i-1];
(C) for int x=0;x<5;x=x+1) Y=X[x]; (D) All of the above
14) Which of these is not a primitive data type?
(A) int (B) short
(C) longer (D) char
15) Which of the following statements are correct in terms of coding in JAVA?
(A) x == y; (B) y = x + y;
(C) x = x + -y; (D) All of the above